Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

macro on button

hi , am new to qlik view

i have 2 variables F_date and T_date

if F_date is more than  T_date  have to display the error message

how to do please help me

by using  macro vb script

1 Solution

Accepted Solutions
susovan
Partner - Specialist
Partner - Specialist

Hi Hari,

Please find the attachment.

Its might be work,

21.JPG !

Warm Regards,
Susovan

View solution in original post

9 Replies
Not applicable
Author

Is this ok?

chrisg
Partner - Creator III
Partner - Creator III

Hi Hari,

i  do not think it is necessary to control the via a macro. You could put a variable via a trigger and then display a box on a condition. Can you privdeus a little more informations

Best regards

Christoph

Do or Do Not. There is no try!
Not applicable
Author

hi chrisg

my requirement is like that  only

how to retreive variable data from qv tomacro

susovan
Partner - Specialist
Partner - Specialist

Hi Hari,

Please find the attachment.

Its might be work,

21.JPG !

Warm Regards,
Susovan
anagharao
Creator II
Creator II

Hi,

You could use the below VB script for an action in a button:

Public Sub CheckDate()

    Set FDate =  ActiveDocument.Variables("F_date")

    Set TDate =  ActiveDocument.Variables("T_date")

    IF FDate.GetContent.String > TDate.GetContent.String Then

        Msgbox("Error Message")

     End if

End Sub

You could use variables to do the same without using any VB script.

Not applicable
Author

thank you so much susovan.g

Not applicable
Author

THANK YOU SO MUCH anagharao

awhitfield
Partner - Champion
Partner - Champion

Hi Hari,

You can do this really easily without using a macro, just use a text box with a conditional hide / show.

See the example attached, which just uses:

To make the error visible when Variable1 is more than Variable2

Andy

Not applicable
Author

hi awhitfield

this one is done but my boss not accepted

thank you awhitfield