How to Make macros work automatically on opening the worksheet

  • Thread starter Thread starter sjayar
  • Start date Start date
S

sjayar

Hi All,

I have a worksheet which contains combox and textboxes i have written a
macro to fill the comboboxes with values.

My problem is this macro works only when i press F5 or if i select the
macro and click on the run button.

Is there a way to automatically run the macro on opening the
worksheet.
if so where/what code to be written to make this process run?

Plz help me out
 
Private Sub Workbook_Open()
'your code here
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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