Using Excel 2003: I have some form control option buttons in a group on my worksheet. As is, I have subroutines for each, that when you click them it changes the value of a variable (forceSelection). Works fine.
My problem is, when I first open Excel to the worksheet, one of the option buttons is already selected (the one selected when it was last saved). However, the variable forceSelection is not set until an option button is clicked.
So, if the user opens the worksheet and sees that the option they want is already selected, and they click the "RunProgram" button, it fails, since forceSelection doesn't have a value yet in the "RunProgram" subroutine.
In the subroutine for the "RunProgram" button, I tried this code, but it doesn't work:
If Sheets("Weld Data").XForceBtn.Click = True Then forceSelection = 4
The error is:
Run-time error '438':
Object doesn't support this property or method
Thanks ahead of time!
My problem is, when I first open Excel to the worksheet, one of the option buttons is already selected (the one selected when it was last saved). However, the variable forceSelection is not set until an option button is clicked.
So, if the user opens the worksheet and sees that the option they want is already selected, and they click the "RunProgram" button, it fails, since forceSelection doesn't have a value yet in the "RunProgram" subroutine.
In the subroutine for the "RunProgram" button, I tried this code, but it doesn't work:
If Sheets("Weld Data").XForceBtn.Click = True Then forceSelection = 4
The error is:
Run-time error '438':
Object doesn't support this property or method
Thanks ahead of time!