Thread: Macro button
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Macro button

In the macro associated, you can do

Sub Btn_Click()
Dim btn as Button
set btn = Activesheet.Buttons(Application.Caller)
If lcase(btn.Caption) = "no" then
btn.Caption = "Yes"
elseif lcase(btn.Caption) = "yes" then
btn.Caption = "No"
end if
End Sub

--
Regards,
Tom Ogilvy

"LeBob" wrote in
message ...

Hi,

I've writtten a macro under VBA and associate it to a button (Display,
toolbar, form).
Is it possible to be connected with this button in my vba code to
modify its caption for instance ??
YES ???
Great !!
How ???

Thanks


--
LeBob
------------------------------------------------------------------------
LeBob's Profile:

http://www.excelforum.com/member.php...o&userid=31185
View this thread: http://www.excelforum.com/showthread...hreadid=508563