View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default result from userform click...

In the form

Private mcButton1 As Boolean
Private mcButton2 As Boolean
Private mcButton3 As Boolean

Public Property Get Button1() As Boolean
Button1 = mcButton1
End Property

Public Property Get Button2() As Boolean
Button2 = mcButton2
End Property

Public Property Get Button3() As Boolean
Button3 = mcButton3
End Property

Private Sub cmdButton1_Click()
With Me

mcCButton1 = True
.Hide
End With
End Sub

Private Sub cmdButton2_Click()
With Me

mcCButton2 = True
.Hide
End With
End Sub

Private Sub cmdButton3_Click()
With Me

mcCButton3 = True
.Hide
End With
End Sub

Private Sub UserForm_Activate()
mcButton1 = False
mcButton2 = False
mcButton3 = False
End Sub


In the form calling module

With UserForm1

.Show
If .Button1 Then

'do something
ElseIf .Button2 Then

'do something else
ElseIf .Button3 Then

'do something other else
End If
End With

--
__________________________________
HTH

Bob

"SpeeD" wrote in message
...
hi.

I´m running a macro that prompts the user for a form, so that the user
could
choose from 3 options (3 click buttons...) how can i return that chosen
"click" (value) to my macro so it continues and GOTO another part of the
same
macro??

Sorry but i still have no final code.... i hope i could make my self
clear!!!

Thank´s speed