Some help here

• Question

• JXF493

When i press button1 first time writed "one" = 1 and "two" = 1.

Sunday, November 22, 2015 10:35 AM

• Move the If ... later=3 before all the other If's  (first in the sub)

Or you can do:

If Later=1 then

'' here all the if lastbutton=...  statements  for Later=1

Elseif Later=2 then

''  here all the if Lastbutton=....  statements for Later=2

endif

Jan [ WhTurner ] The Netherlands

Sunday, November 22, 2015 5:30 PM
• That is exactly what you ask the program to do:

The first click triggers the first If and   One="1"; Later =2

The second click triggers the last if   then  Two="1"; Later = 3.

Jan [ WhTurner ] The Netherlands

Sunday, November 22, 2015 10:51 AM
• Remove the last If block:

If LastButton = Button1 And Later = 2 Then
Two = "1"
Later = 3
TextWindow.Write("    "+Two)
EndIf

What do you want to do if button1 is pressed a second time?

Jan [ WhTurner ] The Netherlands

Sunday, November 22, 2015 3:24 PM

All replies

• That is exactly what you ask the program to do:

The first click triggers the first If and   One="1"; Later =2

The second click triggers the last if   then  Two="1"; Later = 3.

Jan [ WhTurner ] The Netherlands

Sunday, November 22, 2015 10:51 AM
• When I press first time, then written "One" and "Two". Only "One" needs to write. How to fix?

Sunday, November 22, 2015 11:04 AM
• Remove the last If block:

If LastButton = Button1 And Later = 2 Then
Two = "1"
Later = 3
TextWindow.Write("    "+Two)
EndIf

What do you want to do if button1 is pressed a second time?

Jan [ WhTurner ] The Netherlands

Sunday, November 22, 2015 3:24 PM
• In a second time when button pressed that must write to TextWindow: "1"
• Edited by Sunday, November 22, 2015 4:20 PM
Sunday, November 22, 2015 4:20 PM
• Move the If ... later=3 before all the other If's  (first in the sub)

Or you can do:

If Later=1 then

'' here all the if lastbutton=...  statements  for Later=1

Elseif Later=2 then

''  here all the if Lastbutton=....  statements for Later=2

endif

Jan [ WhTurner ] The Netherlands

Sunday, November 22, 2015 5:30 PM
• Thanks.
Monday, November 23, 2015 1:46 PM