Thread: Macros on excel
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
AJPG AJPG is offline
external usenet poster
 
Posts: 4
Default Macros on excel



"stevebriz" wrote:

You can do it through VBA
open the workbook
press "ALT" F11"
this opens the VB editor will open
Under the project explorer.
double click on "this workbook " and then in the code window
paste as below ...you need to replace NameOfMacro with your Macro name
go back to excel and save the workbook.
And next time you open it - it will ask to enable macros ...so say
Enable
and then the macro will run.

Private Sub Workbook_Activate()

Call NameOfMacro

End Sub

AJPG wrote:
I'am sorry but i like to know how can activate a macro when i open a worksheet.
I have done a macro (ctrl+a) that do wat i want, but i must run it when i
open the worksheet.

Thanks in advance
Pinto Guimaraes