View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default command button and assign macro

That's not what I meant--but may have been what I wrote!

I meant that you'd need different code depending on what type of buttons you
used to disable/hide the button.

And if you disable/hide either of the buttons, then you won't be able to click
on that button to toggle it back to enabled/visible. You'll need some other way
to turn it back on--another button with code that points at that other button.

And just in case, I meant that you could choose to disable the button or hide
it. You don't need to do both.



"RichardO <" wrote:

Wow, thanks much for your explanations, Dave:

For your response to #4, are you saying that if I want to disable/hide
and then enable/unhide the button, I should only use the Forms toolbar
(and not the controlbox toolbar) and the following code will disable
and then enable the button later on?

Option Explicit
Sub testme01()
MsgBox "Yo"
With ActiveSheet.Buttons(Application.Caller)
Enabled = True
'or
Visible = False
End With
End Sub

Richardo

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson