Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro's

Hi Experts,

Please help me for this macro's code

it's Not working properly.

SUB DateRange

IF ActiveDocument.Fields("DateRange").GetContent.String = "1" THEN

ActiveDocument.Fields("DateRange").SetContent "0", True

  Else

  ActiveDocument.Fields("DateRange").SetContent "1", True

SET ActiveDocument.Fields("DateRAnge").Select ="DateRange"

IF vDefaultDateRange=1 THEN

  ActiveDocument.Fields("DateRange").Select "YTD"

  ELSE IF vDefaultDateRange=2 THEN

  ActiveDocument.Fields("DateRange").Select "MTD"

  ELSE IF vDefaultDateRange=3 THEN

   ActiveDocument.Fields("DateRange").Select "WTD"

  Else

  ActiveDocument.Fields("DateRange").Select "PTD"

  END IF

  END IF

  END IF

END IF

END SUB

2 Replies
tamilarasu
Champion
Champion

Please do not create multiple questions for the same issue. See my reply in below link.

Macros unparised load faild

Also, Please check and close all your previous questions.

Anil_Babu_Samineni

Siva,

I request you to all, Don;t create more than one issue. As Suggest tamil i agree for that. Because, next time when i was getting same bug that time i don;t want to see more than for specifically. Please delete this and continue the before one, Please?

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