Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro Parse failed. Functionality was lost error when creating a cyclic group in a Macro

Hi,

I am receiving an error 'Macro parse failed.  Functionality was lost' when a macro is executed to create a cyclic group.  This is only happening when using the Access Point.  The desktop client works fine.  Below is the Macro code.  Does anybody know why this may be happening?

sub mSetDatesCyclicGroup

   SET x = ActiveDocument.Variables("vDateConditon")

   SET y = ActiveDocument.Variables("vMonthEndDisplay")

   If x.GetContent.String = "1" Then

        If y.GetContent.String = "0" THEN

            ActiveDocument.RemoveGroup "Dates"

            set gr=ActiveDocument.CreateGroup("Dates")

            gr.AddField "MonthEnd"

            gr.AddField "WeekEnding"

            gr.AddField "Date"

            set gp = ActiveDocument.GetGroup("Dates").GetProperties

            gp.IsCyclic = true

            ActiveDocument.GetGroup("Dates").SetProperties gp

            ActiveDocument.GetApplication.Refresh

               y.SetContent "1",true

        End If

   Else

        If y.GetContent.String = "1" THEN

            ActiveDocument.RemoveGroup "Dates"

            set gr=ActiveDocument.CreateGroup("Dates")

            gr.AddField "MonthEnd"

            set gp = ActiveDocument.GetGroup("Dates").GetProperties

            gp.IsCyclic = true

            ActiveDocument.GetGroup("Dates").SetProperties gp

            ActiveDocument.GetApplication.Refresh

               y.SetContent "0",true

        End If

   end if

end sub

Thanks

Nilesh

13 Replies
Not applicable
Author

Hi Nilesh,

Did you try like this

Capture.PNG

Here you need to check the 3rd option.

Hope it helps you...

Regards...

Not applicable
Author

Hi Ravikumar,

I do not get this option to appear.  Do you know how I can reset the IE settings for this box to appear?

Thanks

Nilesh

Not applicable
Author

Hi Nilesh,

There is no need to change the IE settings.

This window will appear when your file is opened (because it may had macros).It will asks by providing the window for which macros you want to allow.

Please take a look your edit module to be like this.

Capture1.PNG

Regards..

Not applicable
Author

This is already set.  I am actually trying to execute these macros on a Test Server which now has a Test server license.  Are Test servers allowed to execute macros?

jcampbell
Partner - Creator
Partner - Creator

Yes, a test server can run Macros. The problem is likely that the option to allow any macro to run (as mentioned above) was not selected. To correct this:

1. Open your QVW file via Internet Explorer

2. Type Ctrl + Shift + M

3. Choose the option "Give System Access to Module Script" and click "OK"

Screen Shot 2011-12-20 at 2.44.36 PM.png

Not applicable
Author

This has been identified as a bug by Qliktech when we use a macro to create the Cyclic Groups.  Not sure when they will target to fix it.

Anonymous
Not applicable
Author

Hi Nilesh,

Has the issue been fixed? As I am getting the following error.

PPT Error.png

Not applicable
Author

Hi Saurabh,

I am not sure and did not look into this any further after it was identified as a bug.

Nilesh

Not applicable
Author

Hi Saurabh,

I am not sure and did not look into this any further after it was identified as a bug.

Nilesh