Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Auto macro opening excel workbook

I would like to run automaticaly a macro when opening a workbook.
I have found answers, but I don't understand them. Please detail me the step
in excel and visual basic to make this possible.

Thank you very much in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Auto macro opening excel workbook


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)


"Baris" wrote in message
...
I would like to run automaticaly a macro when opening a workbook.
I have found answers, but I don't understand them. Please detail me the

step
in excel and visual basic to make this possible.

Thank you very much in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Auto macro opening excel workbook

Open the VBA Editor. Go to the Insert menu and choose Module (not
Class Module). In that module, place the following code:

Sub Auto_Open()
' the code you want to run
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Baris" wrote in message
...
I would like to run automaticaly a macro when opening a
workbook.
I have found answers, but I don't understand them. Please
detail me the step
in excel and visual basic to make this possible.

Thank you very much in advance.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a Workbook with a Macro Eli[_4_] Excel Discussion (Misc queries) 4 October 3rd 08 12:13 AM
Auto Protect workbook with password upon opening Brian Excel Worksheet Functions 0 February 23rd 05 05:45 PM
excel VBA problem - setting workbook as variable & opening/re-opening safe Excel Programming 1 August 20th 04 12:22 AM
Macro to email excel workbook with static recipient and auto subject ryan Excel Programming 4 July 9th 04 11:30 PM
Auto opening macro when loading a workbook Mike Boardman Excel Programming 4 May 8th 04 07:42 AM


All times are GMT +1. The time now is 03:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"