Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have written Macro code to export few report (Main, Enabler and Wholesale). I would like to retain and add another code to extract all the report into one with multiple sheet. Any idea, guys? My code is below, rather not change much
'Main
sub exportToExcelMain
Dim path
path = getExportPathMain()
dim o
Set o = ActiveDocument.GetSheetObject("Main")
o.ExportBiff path
Set o = nothing
msgbox("Export to " & path & " succeeded!")
end sub
function getExportPathMain
getExportPathMain = ActiveDocument.Variables("Main Export").GetContent.String
end function
'Enabler
sub exportToExcelEnabler
Dim path
path = getExportPathEnabler()
dim o
Set o = ActiveDocument.GetSheetObject("Enabler")
o.ExportBiff path
Set o = nothing
msgbox("Export to " & path & " succeeded!")
end sub
function getExportPathEnabler
getExportPathEnabler = ActiveDocument.Variables("Enabler Export").GetContent.String
end function
'Wholesale
sub exportToExcelWholesale
Dim path
path = getExportPathWholesale()
dim o
Set o = ActiveDocument.GetSheetObject("Wholesale")
o.ExportBiff path
Set o = nothing
msgbox("Export to " & path & " succeeded!")
end sub
function getExportPathWholesale
getExportPathWholesale = ActiveDocument.Variables("Wholesale Export").GetContent.String
end function
Thank you so much, it works!