Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed as Marco no longer works

I have moved from QV8.5 to QV11 and the macro below now fails

Any help as to why?

Sub RunMe()

Call exportToExcel("hsplit_zS_NCT","path x y z... \Automated report\NewCo_Trial_hsplit_export.xls")

end sub

sub exportToExcel(objectId, filePath)
dim o
Set o = ActiveDocument.GetSheetObject(objectId)
o.ExportBiff filePath
Set o = nothing

f_name = filePath     
Set oXL=CreateObject("Excel.Application")     
Set oWB=oXL.Workbooks.Open(f_name)   
Set oSH=oWB.Worksheets.Item(1)   
'oSH.Cells(3,1) = ActiveDocument.Variables("vSelectedOrders").GetContent.String           
oWB.Save    
oWB.Close          
Set oSH=nothing    
Set oWB=nothing    
Set oXL=nothing

end sub

1 Reply
Not applicable
Author

Still hoping some one can help with this one????