View Single Post
  #11   Report Post  
Norman Jones
 
Posts: n/a
Default

Hi Dave,

To Retest, I added some Option buttons and 2 text boxes, together with a
command button, (from the Control Toolbox) to the first sheet of a new
workbook. I added some text to each text box and clicked an option button.

I inserted the body of my posted macro into the button's click event (in the
sheet module behind the first sheet).

Then, running the code from the button (or directly from the module),
cleared the selected option button and the text from each textbox without
problem.

I was unable to replicate your error.


You say that you had a problem with Bob's code but, as Bob indicated, his
code was designed for controls on a userform and this is not applicable to
the situation you describe.

BTW, I wouuld advocate changing my code line:

For Each oleObj In ActiveSheet.OLEObjects
to
For Each oleObj In Me.OLEObjects

Try running the test oulined above on a new workbook.

If, then, you are still experiencing the same problem, you may, if you wish,
send me a copy of your book. Remove any confidential data.


nXorman_jXones@btXconnectDOTcom

(replace dot and remove each X)


---
Regards,
Norman



"Dave_2k5" wrote in
message ...

Norman, Bob

The Option Buttons and Text boxes are from the Toolbox. I have created
them directly on the first sheet in the workbook.

I have tried both of the codes you have sent:

Norman, the one you suggested has a runtime error of: Unable to get the
Object property of the OLEObject class.

Bob, the one you suggested has a Compiler Error: Method or data member
not found.

Is there any more sujesstions out there...

Please HELP!!!

Dave


--
Dave_2k5
------------------------------------------------------------------------
Dave_2k5's Profile:
http://www.excelforum.com/member.php...o&userid=19667
View this thread: http://www.excelforum.com/showthread...hreadid=389835