is it possible to make a button in an excel spreadseet to become invisible from vb6 after calling out the excel template?
Printable View
is it possible to make a button in an excel spreadseet to become invisible from vb6 after calling out the excel template?
Try this. In my case it hides the Paste button.
You would need to iterate through the controls until the Caption matched the one you were looking forVB Code:
MsgBox Application.CommandBars("Standard").Controls(10).Caption Application.CommandBars("Standard").Controls(10).Visible = False
Then set it to false.
Be carefull though, you'll need to set the button visibility back to true when exiting or it won't show up next time you open Excel. Unless that is your desired effect.
sorrie...i make a wrong statement...
the button which i mention comes from the control toolboxin excel (commandbutton1 for eg)...tha t is paste on the sheet.....trying to make it invisible..
I posted the answer in your VBA Forum thread.