Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Tags (2)
6 Replies
MVP
MVP

Macro Error

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
Valued Contributor III

Macro Error

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

Macro Error

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
Valued Contributor III

Re: Macro Error

Hello,

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

Not applicable

Macro Error

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
Valued Contributor III

Re: Macro Error

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.

Community Browser