VB Macro to Loop (User-Defined) Field and Export (User-Defined) Chart to Excel and Name Sheets by Field Value
This is a vbScript macro that uses two variables primarily in the QV application - vfname and vMacroChartId.
The script will loop the field provided as the value in the variable - most likely via input box object in the QV app - and export to Excel the object id provided as the value in the second variable - also most likely via input box in the QV app. Within Excel, this will result in the copied object being pasted into each sheet for the possible values available in the field variable as well as name the sheet with the field value selected at the time of export.
This has potential in various applicable contexts to add much more flexibility to the standard Excel export options within QV currently.
confirmation = MSGBOX ("Ad hoc Excel export has been initiated." & vbCrLf & "Do you wish to continue?"& vbCrLf &"", 36, "Export Confirmation")