Public Function ImportExcel2DataTable() As DataTable
Dim MyConnection As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection
Dim DtTable As New DataTable
Dim strShetname As String
Dim DtSet As System.Data.DataSet
Dim MyCommand As...
I struggled again,
when i work under the file menu its ok.
now am moving to next menu like 'Edit'.
i can use like below..
Form1.EditToolStripMenuItem.DropDownItems("Paste" ).Enabled = True
but at runtime i dont know which toolstipmenuitem am working..
so what can i do for this...
i done what u say, but it shows "object not set to an instance of an object"
my code is
Dim menuname As String = "Config"
Form1.FileToolStripMenuItem.DropDownItems("menuname").Enabled = True
here is the procedure
MDI(Form1)-->File (under the file menu)
Config (i assigned "config" name property is menu_101 (not text property) to String variable)
Dim str as string="menu_101"...
i tried as u told like
"Dim menuname As String = "Menu_106"
Form1.MenuStrip1.Items(menuname).Enabled = True"
but it shows the error like
"object reference not set to an instance of an object"
what should i do for that?
i need to call mdi form toolstripmenuitem name using the string variable.
mdi form is Form1.
toolstripmenuitem is customer master
if i do like that "Form1.customer master.Enabled=True" its working
but my issue is i stored customer master in a string variable like