Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro use Field Value Selected

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!!!

1 Reply
Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful