please help I need to inset an excel workbook / sheet into vb and i need to be able to edit it in vb. And be able to run it in vb eg i can click on the macro buttons in excel
please help soon
thanks
Printable View
please help I need to inset an excel workbook / sheet into vb and i need to be able to edit it in vb. And be able to run it in vb eg i can click on the macro buttons in excel
please help soon
thanks
You just want to run the excel macro?
Embed an Excel OLE Object on your VB Form.
i have put an excel ole object but i can click on the buttons in our excel sheet !!!
VB Code:
Dim xlApp As New Excel.Application Dim xlWb As Excel.Workbook Set xlWb = xlApp.Workbooks.Open("c:\test.xls") xlApp.Visible = True xlWb.Application.Run "MacroName" xlApp.Quit Set xlWb = Nothing Set xlApp = Nothing
Something like that?
where do i put that in my vb, do i put it in the ole or what, please help,
i am greatfull for all that you do
anywhere
in your code
You have to add a reference to Microsoft Excel Object Library
it has an error
Dim xlApp As New Excel.Application
Dim xlWb As Excel.Workbook
error >> Set << xlWb = xlApp.Workbooks.Open("c:\test.xls")
xlApp.Visible = True
xlWb.Application.Run "MacroName"
xlApp.Quit
Set xlWb = Nothing
Set xlApp = Nothing
error says invalid outside procedure
Put all that in say
your Form_Load event then
or the click event of a command button.