Assign macros to button!

  • Thread starter Thread starter aiyer
  • Start date Start date
A

aiyer

Hi all!

I was trying to assign a macro to a command button which I named a
'Read File'.
Normally I right click the command buttona nd there will be a 'assig
macro' option and I assign macros accordingly. I do not see any o
those when I right click with the mouse on the command button 'Rea
File'.

Is there any other box I need to check? I look forward to some tips.

Thanks alot guys,

Arun.
Vt Corp
 
Hi

On a button from the Forms Toolbar you can right click and assign a macro

If you have a button from the controltoolbox
Press the first button on the controltoolbox toolbar to go into the design
mode
Double click on the button you placed on your worksheet.
The VBA editor will open with this

Private Sub CommandButton1_Click()

End Sub

You can place the code in the event or place the macroname in the event.
Press Alt-q to go back to Excel and press the first button on the
controltoolbox again to exit the design mode
 

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

Back
Top