Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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