Setting value of option button

Glory

Well-known Member
Joined
Mar 16, 2011
Messages
640
Two userforms. One has an option button, the other has a command button.

Clicking the option button on the first form loads the second userform and sets the value of the option button to -1.

Clicking the command button on the second userform is suppsed to set the value of the option button on the first userform to 0.

Instead, an error message appears, which reads "Invalid use of null", and the option button on the first userform becomes gray... neither checked nor unchecked.
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,848
What is the code you are using to accomplish the actions you described?
 

Rasm

Well-known Member
Joined
Feb 9, 2011
Messages
500
use

OptionBox.value = True or False (instead of 0 & 1)
 

Watch MrExcel Video

Forum statistics

Threads
1,108,632
Messages
5,523,994
Members
409,554
Latest member
denistrevisan

This Week's Hot Topics

Top