Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have been trying to get the following to work but when clicking the
Yes to All the userform re-appears each time it performs the routine. Anyone know how to get it to appear only the once? Module code: Public Sub test() Dim MsgForm As UserForm1 Dim nResult As Long Set MsgForm = New UserForm1 Load MsgForm With MsgForm .Label = "My Prompt" .Show nResult = .Result End With Unload MsgForm Set MsgForm = Nothing Select Case nResult Case -1 'Do "Yes" stuff Case 0 'Do "No" stuff Case 1 'Do "Yes to all" stuff End Select End Sub Userform1 code: Public nResult As Long Property Let Label(sLabel As String) Label1.Caption = sLabel End Property Property Get Result() As Long Result = nResult End Property Private Sub CommandButton1_Click() nResult = -1 'Yes Me.Hide End Sub Private Sub CommandButton2_Click() nResult = 0 'No Me.Hide End Sub Private Sub CommandButton3_Click() nResult = 1 'Yes to all Me.Hide End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove Email View on spreadsheet | Excel Discussion (Misc queries) | |||
how to remove e-mail view | Excel Discussion (Misc queries) | |||
How do I remove Watermark from View. | Excel Discussion (Misc queries) | |||
remove view format | Excel Discussion (Misc queries) | |||
View only UserForm? | Excel Programming |