Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro Error

Hi Folks,

I created the macro to Store the Table chart Data into QVD. But it gone to error.

Please find the below piece of Script.

sub ExpQVD

set obj = ActiveDocument.GetSheetObject("CH01")

set v=ActiveDocument.Variables("vQVDPath")

set va=v.GetContent

set QVDPath=va.String

set QVDFile= QVDPath & "\armorcheckreport.qvd"

obj.ExportEx QVDFile, 4

End Sub

I got Error: Object required: '[string: "qvdata"]'

Please help me.

Thanks & Regards,

Siri

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

It looks like QVDPath is a string, then the statement

set QVDPath = va.String

should be

QVDPath = va.String

The same with set QVDFile. In VB, the set statement is used only for objects, not standard data types.

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Use below code:

sub ExpQVD

set obj = ActiveDocument.GetSheetObject("CH03")

set v=ActiveDocument.Variables("vQVDPath")

obj.ExportEx v.GetContent.String&"\armorcheckreport"&".qvd",4

End Sub

-Make sure your path should look in variable vQVDPath like this.. D:\Work or D:\Work\Test or D:\Work\Test\File

- And also make sure in Edit module  Module security as System Access and Current local security as Allow System Access

- And also your straight table id is CH03

hope it helps you

Not applicable
Author

Thanks for your Reply.

vQVDPath= ..\qvdata\staging

The above is the QVD Path and it works or not?

I have one Q. Why we should to change the Module Security as System Access and Current local security as Allow System Access?

Thanks,

Siri

jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Plz give full path of your location. Ok plz check the attached file.

Not applicable
Author

Hi Jagan,

Thanks for your mail.

In your application, I didn't find any Macro.

In our Application, the vQVDPath value came from the txt file. The USER enter this value.

The QVDPath value is: "..\qvdata\staging".

Thanks,

Siri

jagannalla
Partner - Specialist III
Partner - Specialist III

i'm extremly sorry.. Here is the file plz check the file.

It that is in the case, it will not work b'coz we need to give full path i'mean along with directory name.