Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with command button setting it visable

Status
Not open for further replies.

wwgmr

MIS
Mar 12, 2001
174
US
Hi I seem to be having a problem with a command button. On the click event I have this happen

cmbCallEvent()
cmbcallevent.visable = false
call Macro1
end sub

The problem I am having is when I try to reset my Page and bring all my buttons back I cannot seem to set it to visable

cmbcallevent.visable = true doesn't work VBA doesn't even offer Visable where it did before.

Thank you!

Is this because it already is visable false? So the code cannot see it?
 
Hi,
You could add this to the worksheet.activate event

Private Sub Worksheet_Activate()
cmbcallevent.Visible = True
End Sub

Then when you move to a different sheet and move back your button would reappear.

You can also see it if you add the control toolbox to your menus and press the "Design Mode" button.


I hope you just did a typo with your spelling of visible, cause VB doesn't understand visable!


[pipe]
 
wwgmr,

Another option would be for you to use the Enabled property.

Setting this to false would prevent any code attached to it being executed.

Private Sub Worksheet_Activate()
cmbcallevent.Enabled = True/False
End Sub


Leigh Moore
LJM Analysis Ltd
 
Thank you very much enabled seem to work. Thanks again. I was really getting confused why it wouldn't allow me to change it back.

Thank you both.!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top