Joel, the last line in your code: Set but = ... Now it appears to me that
'but' is undefined ....
"joel" wrote:
I usually have a macro for each button/box and then call a common
routine the handles all the buttons/boxes like this
Private Sub CommandButton1_Click()
call commonbutton("CommandButton1")
End Sub
in a module
Sub Commonbutton(buttonName as string)
Set but = Sheets("test").OLEObjects(buttonname).Object
end sub
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=160931
Microsoft Office Help
.