Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bharatkishore
Creator III
Creator III

Macro Problem

Dear Member,

I have the following Macro

sub calcmin

set min = ActiveDocument.Variables("currentdatemin")

set max = ActiveDocument.Variables("currentdateMax")

set f=ActiveDocument.Fields("E_Date_New")

f.clear

f.Select ">=" + min.GetContent.String + "<=" + max.GetContent.String

end sub

Now when i click on "Test" button means i am getting the following error.

Object required: 'max'

Can you please help me to sort this issue.

Thanks and Regards,

R. Bharat Kishore

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Please find the attachment. I think you missed the variable declaration.

Thanks.

View solution in original post

9 Replies
tresesco
MVP
MVP

it suggests that 'max' variable is got getting value assigned. see if your 'currentdateMax' is right or not.

Thanks.

bharatkishore
Creator III
Creator III
Author

Thanks for the reply. The value is correct. But When i am running the macro it is executing but the variables are not getting any values. They are showing as Null. I took a calendar object.

tresesco
MVP
MVP

Is there any chance you can upload a sample application?

Thanks.

bharatkishore
Creator III
Creator III
Author

PFA File.

tresesco
MVP
MVP

Please find the attachment. I think you missed the variable declaration.

Thanks.

bharatkishore
Creator III
Creator III
Author

Thank you for your answer. Can you please tell me what i did i miss. Can you tell me the process.

Thanks.

bharatkishore
Creator III
Creator III
Author

I got it. Thanks a lot and when i am loading the same qvd in the main qlikview my count of one of my field is not coming. I mean if the load qvd count of A is 100. But if i load the same qvd my in my main file then count of A is getting to 50. Can you please tell me where did i do wrong.

tresesco
MVP
MVP

its very tought to say without looking at the application where you are having the issue. may be any inner join reducing the records.

Thanks.

bharatkishore
Creator III
Creator III
Author

I am not using any joins. i am fetching the qvd's only. And the above macro is there. Thats it. But i don't know what was the reason.

Thanks and Regards,

R. Bharat Kishore