Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlikers,
I would like to launch the following macro and use the field value selected inside this VB macro.
My purpose is saving an Excel File with the month name selected from the user.
MonthName is a field!!
Sub SendReport
ActiveDocument.Sheets("SH02").Activate 'edit the sheet
'ActiveDocument.reload
set objExcel=ActiveDocument.GetSheetObject("CH23") 'edit the sheet object
filepath="\\......path..........\"& MonthName &".xls" 'edit the location of file
objExcel.ExportBiff filepath
ActiveDocument.GetApplication.Sleep 5000
End Sub
Have you any idea??
Thanks in advance!!!
I am not expert in This? But have a look
Sub SendReport
ActiveDocument.Sheets("SH02").Activate 'edit the sheet
'ActiveDocument.reload
set objExcel=ActiveDocument.GetSheetObject("CH23") 'edit the sheet object
filepath="\\......path..........\"& SubField(Concat(MonthName, ','), ',', 1) &".xls" 'edit the location of file
objExcel.ExportBiff filepath
ActiveDocument.GetApplication.Sleep 5000
End Sub