Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How about a Worksheet_Activate event in the Sheet2 code module that checks
toggle button 1 for true and then call the form? "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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assumes that ToggleButton1 is located on Sheet1.
Private Sub Worksheet_Activate() If Sheets(1).ToggleButton1 = 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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use a password in VBA ActiveSheet.protect & ActiveSheet.unprotect? | Excel Programming | |||
Copying new activesheet after other activesheet is hidden? | Excel Programming | |||
Get ActiveSheet name in VB | Excel Programming | |||
name of the activesheet | Excel Programming | |||
ActiveSheet.Name? | Excel Programming |