Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When users run the following query, which exports some charts as CSV files to a network location, they get a Macro Parse Failed error. I'm not getting the error and just can't find a reason why it's working for me and not them. I've checked the macro security on their IE plugin as well as their rights to the network folder, it all looks fine.
Sub ExportCSV
'Download Sheet object data to CSV
SET vSKUVal = ActiveDocument.Fields("SKU").GetSelectedValues 'Only one selection allowed
'msgbox(vSKUVal.Item(0).Text)
vFilename = vSKUVal.Item(0).Text
set sObject = ActiveDocument.GetSheetObject("CHItemsList")
sObject.Export "\\occ01fs010\boi03_public$\QlikView-Recall\Items_List_for_" & vFilename & ".CSV",","
set sObject = ActiveDocument.GetSheetObject("CHDistroList")
sObject.Export "\\occ01fs010\boi03_public$\QlikView-Recall\Affected_Distribution_List_for_" & vFilename & ".CSV",","
set sObject = ActiveDocument.GetSheetObject("CHNonDistroList")
sObject.Export "\\occ01fs010\boi03_public$\QlikView-Recall\Non-Affected_Distribution_List_for_" & vFilename & ".CSV",","
msgbox "Files Exported",48,"Trace & Recall"
Set objShell = CreateObject("Wscript.Shell")
vFolderToOpen = "explorer.exe /e," & "\\occ01fs010\boi03_public$\QlikView-Recall"
objShell.Run vFolderToOpen
Set objShell = Nothing
End Sub
The problem was that one of the charts being exported was located on a sheet the users did not have access to. Once moved to another sheet, the macro worked fine.
What is the error message?
It's the standard, and useless, message that states "Macro Parse Failed, Functionality Lost".
The problem was that one of the charts being exported was located on a sheet the users did not have access to. Once moved to another sheet, the macro worked fine.