Command button

G

Guest

1.How can I assign a macro to a command button.
2.How can I hide workshhets at openning a excel workbook.
My aim is: Users of my excel workbook must click command buttons at one
worksheet to go other worksheets and have to read some notices before that.
Thank you.
 
G

Guest

hi
1. from the tool box, drag and drop the command button on the sheet. while
in design mode, right click the button then click view code. you can paste
the macro into the button code or if your macro is in a standard module, you
can call the macro....
call yourmacro1

2. to hide a sheet....
Sheets("sheet2").visible = False
to unhide a sheet....
Sheets("sheet2").visible = True

Regards
FSt1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top