I have a Userform that is opened by worksheet change event:
The form has various checkboxes in it, each linked to a specific macro depending on the activity being selected via checkbox. I want my userform to remain open and in the worksheet whilst other sheets are selected, as users may want to return to the form and select another checkbox. I cannot manage to do that. The userform does remain open but it shows on any other sheet that is selected (almost like a floating menu). I have tried this code, but with no success:
Any advice greatly appreciated.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("E4")) Is Nothing Then
Load frmActions
frmActions.Show
End If
End Sub
The form has various checkboxes in it, each linked to a specific macro depending on the activity being selected via checkbox. I want my userform to remain open and in the worksheet whilst other sheets are selected, as users may want to return to the form and select another checkbox. I cannot manage to do that. The userform does remain open but it shows on any other sheet that is selected (almost like a floating menu). I have tried this code, but with no success:
VBA Code:
Private Sub Worksheet_SheetActivate(ByVal Sh As Object)
If Sh.Name <> "Actions" Then
Unload frmActions
End If
If Sh.Name = "Actions" Then
frmActions.Show
End If
End Sub
Any advice greatly appreciated.