View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
hmaze hmaze is offline
external usenet poster
 
Posts: 13
Default ActiveSheet (IF statement)

That's it - thank you!

"JLGWhiz" wrote:

sorry about the omission.

Private Sub Worksheet_Activate()
If Sheets(1).ToggleButton1.Value = True Then
UserForm1.Show
End If
End Sub


"hmaze" wrote:

All:

I have a form that needs to appear after a togglebutton has been activated
on sheet1 and the user clicks on sheet2. I need the form to appear on
sheet2. (if toggle not clicked and user goes to sheet2, form should not
appear). I tried this on sheet1 but it's not correct:
If ToggleButton1.Value = True And ActiveSheet = Sheet2 Then UserForm1.Show

Can anyone provide some assistance - thank you.