Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I'm programming a Macro to hide/unhide some entire rows and colums, but the following proble occurs: When I add the following script to the option button from controls, it displays an error in line 3 (in the example marked with *): Private Sub OptionButton1_Change() If OptionButton1.Value = True Then Sheets("Voorbeeldportefeuille").Select *Columns("H:K").Select* Selection.EntireColumn.Hidden = False Else Sheets("Invoer").Select End If End Sub When I use the option button from the Forms toolbar, I get the following script after recording the macro, and it works perfectly: Sub Keuzerondje25_BijKlikken() (- = Sub Optionbutton25_Click()) Sheets("Voorbeeldportefeuille").Select Columns("H:K").Select Selection.EntireColumn.Hidden = False End Sub Great that it works, but I want to use the option button from the controls toolbar, as I need to use the change function, in stead of the click function. Can anyone tell me what I'm doing wrong? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Insert comments on Option Button of Forms Toolbar | Excel Discussion (Misc queries) | |||
Option Button on Forms Toolbar | Excel Discussion (Misc queries) | |||
RefEdits and normal forms / forms in a DLL | Excel Programming | |||
Option Button Macro (Forms Toolbar) | Excel Programming | |||
Option Button and forms | Excel Programming |