Here is the scenerio...
3 option buttons on an a sheet. Not grouped! No forms. Nothing fancy.
Being green on the XL VBA code, I recorded the action as a macro, then converted it to the option button.
Upon the click of the button, it simply copy's and pastes on another sheet. The code is below.
I get the good old 1004 error (Select Method of Range class failed).
After some digging I found the links to XL97 kba 177527, but this was suppose to be taken care of fo XL2000.
I tried the "activecell.activate" as suggested in the kba, but no luck.
Private Sub optFourPager_Click()
Sheets("Math Page".Activate
Range("D18".Select
Range("D18".Activate 'the choking starts here!
Selection.Copy
Range("C16".Select
ActiveSheet.Paste
Sheets("Report Page".Select
Range("C16".Select
returnbutton = Msgbox("If this is the estimate, you need to push the Reset PVDS button next!", vbOKOnly, "NOTICE"
optFourPager.Activate
End Sub
I get the feeling that the ActiveX use of the option button is colliding with a focus. I saw suggestions to move the focus, but this didn't work either (or I am just not doing it write (pun intended).
Any help or pointing to help would be appreciated?
Sincerely banging head on keyboard...
m6 (Mike)
3 option buttons on an a sheet. Not grouped! No forms. Nothing fancy.
Being green on the XL VBA code, I recorded the action as a macro, then converted it to the option button.
Upon the click of the button, it simply copy's and pastes on another sheet. The code is below.
I get the good old 1004 error (Select Method of Range class failed).
After some digging I found the links to XL97 kba 177527, but this was suppose to be taken care of fo XL2000.
I tried the "activecell.activate" as suggested in the kba, but no luck.
Private Sub optFourPager_Click()
Sheets("Math Page".Activate
Range("D18".Select
Range("D18".Activate 'the choking starts here!
Selection.Copy
Range("C16".Select
ActiveSheet.Paste
Sheets("Report Page".Select
Range("C16".Select
returnbutton = Msgbox("If this is the estimate, you need to push the Reset PVDS button next!", vbOKOnly, "NOTICE"
optFourPager.Activate
End Sub
I get the feeling that the ActiveX use of the option button is colliding with a focus. I saw suggestions to move the focus, but this didn't work either (or I am just not doing it write (pun intended).
Any help or pointing to help would be appreciated?
Sincerely banging head on keyboard...
m6 (Mike)