G
Gustaf
I made a VB6 app to extract forms and modules from Excel workbooks. Now I'd like to expand this app to also handle Access files (.mdb). Here's the critical parts of the code for Excel:
Dim xlApp As Excel.Application
Dim xlWb As Excel.Workbook
Dim VBComp As VBIDE.VBComponent
' Load workbook
Set xlApp = New Excel.Application
xlApp.Visible = False
Set xlWb = xlApp.Workbooks.Open(sWorkbook)
' Loop through all files (components) in the workbook
For Each VBComp In xlWb.VBProject.VBComponents
' Export the file
VBComp.Export sFile
Next VBComp
I'm trying to do the same thing with an Access file now, but can't find a corresponding Export method. Can it be done? Later, I will need to import (merge) the component files back into the Access file too.
Best regards,
Gustaf
Dim xlApp As Excel.Application
Dim xlWb As Excel.Workbook
Dim VBComp As VBIDE.VBComponent
' Load workbook
Set xlApp = New Excel.Application
xlApp.Visible = False
Set xlWb = xlApp.Workbooks.Open(sWorkbook)
' Loop through all files (components) in the workbook
For Each VBComp In xlWb.VBProject.VBComponents
' Export the file
VBComp.Export sFile
Next VBComp
I'm trying to do the same thing with an Access file now, but can't find a corresponding Export method. Can it be done? Later, I will need to import (merge) the component files back into the Access file too.
Best regards,
Gustaf