MartinS
Active Member
- Joined
- Jun 17, 2003
- Messages
- 489
- Office Version
- 365
- Platform
- Windows
I have been asked to integrate a Cancel button into a processing dialog which displays each process in a running list (see http://www.mrexcel.com/forum/excel-questions/798110-scrolling-label-text.html) as the code progresses.
I added a CommandButton and set it's Cancel property to True (tried it set to both True and False).
I added a public variable definition:
The code behind the button click event is:
When the processing userform is loaded the variable value is set to False.
During the userform's activate code, I check the value and handle appropriately, but it doesn't seem to accept clicks to the button.
What am I missing? Or is this approach just not possible?
Thanks in advance
Martin
I added a CommandButton and set it's Cancel property to True (tried it set to both True and False).
I added a public variable definition:
Code:
Public Cancel As Boolean
Code:
Private Sub cmdCancel_Click()
Cancel = True
End Sub
During the userform's activate code, I check the value and handle appropriately, but it doesn't seem to accept clicks to the button.
Code:
If Cancel Then GoTo SkipProcess
Thanks in advance
Martin