With VB, go to Project, References. Look for 'Microsoft Excel blah blah blah'. Select that. Now you have access to basically running your own version of Excel in the background.
Now you have access to these commands
Code:
Private Sub Form_Load()
Dim ExcelApp As New Excel
Set ExcelApp = New Excel
Excel.Workbooks.Open "filename"
Excel.Application.Run "macro"
Excel.Application.SaveWorkspace
Excel.Workbooks.Close
Set Excel = Nothing
End Sub
I have no idea what works and doesn't. I would be appreciative if you revisit the site to mention what could be corrected. But I hope this is a good start.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.