View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Craig Craig is offline
external usenet poster
 
Posts: 208
Default Unload UserForms

Hi,

I am looking for a way to unload UserForms. I can unload one, but need all
others to unload if vbYes is selected:

Code used is:

Private Sub CommandButton1_Click()
Range("A5:D50", Range("A5:D50").End(xlDown)).sort Range("B50"), xlAscending

Dim Res As VbMsgBoxResult
Res = MsgBox("This will sort data into Red, Amber & Green", vbOKCancel)
If Res = vbOK Then
Unload UserForm5
End If

End Sub

UserForm1 is selected prior to UserForm5 as sort is an option on UF5

Any help gratefully received

Many Thanks

Craig