Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: Macro use Field Value Selected

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