Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default executing macros upon opening xls files

I have a macro named "x" that i want to execute automatically when file
"panel.xls" is opened. Is that possible? any suggestions on how to do it?

--
dr chuck
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default executing macros upon opening xls files

Hi Dr Chuck,

Try :

'=============
Private Sub Workbook_Open()
Call X
End Sub
'<<=============

This is workbook event code and should be pasted into the workbook's
ThisWorkbook module *not* a standard module or a sheet module:

Right-click the Excel icon on the worksheet
(or the icon to the left of the File menu if your workbook is maximised)
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.

---
Regards,
Norman



"dr chuck" wrote in message
...
I have a macro named "x" that i want to execute automatically when file
"panel.xls" is opened. Is that possible? any suggestions on how to do it?

--
dr chuck



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default executing macros upon opening xls files

In a general module:

Sub Auto_open()
mymacroname 'change
End sub
or

Private Sub Workbook_Open()
mymacroname 'change
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 maximize your workbooks),
select View Code from the menu, and paste the code

Mike F
"dr chuck" wrote in message
...
I have a macro named "x" that i want to execute automatically when file
"panel.xls" is opened. Is that possible? any suggestions on how to do it?

--
dr chuck



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default executing macros upon opening xls files

thanks for the info.
i am totally unfamiliar with workbook event code but will give it a shot.
--
dr chuck


"Norman Jones" wrote:

Hi Dr Chuck,

Try :

'=============
Private Sub Workbook_Open()
Call X
End Sub
'<<=============

This is workbook event code and should be pasted into the workbook's
ThisWorkbook module *not* a standard module or a sheet module:

Right-click the Excel icon on the worksheet
(or the icon to the left of the File menu if your workbook is maximised)
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.

---
Regards,
Norman



"dr chuck" wrote in message
...
I have a macro named "x" that i want to execute automatically when file
"panel.xls" is opened. Is that possible? any suggestions on how to do it?

--
dr chuck




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default executing macros upon opening xls files

thanks for your help. I am totally unfamiliar with workbook event code but i
will give it a shot.

--
dr chuck


"Mike Fogleman" wrote:

In a general module:

Sub Auto_open()
mymacroname 'change
End sub
or

Private Sub Workbook_Open()
mymacroname 'change
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 maximize your workbooks),
select View Code from the menu, and paste the code

Mike F
"dr chuck" wrote in message
...
I have a macro named "x" that i want to execute automatically when file
"panel.xls" is opened. Is that possible? any suggestions on how to do it?

--
dr chuck






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default executing macros upon opening xls files

Hi Dr Chuck,

i am totally unfamiliar with workbook event code but will give it a shot.


Since you are unfamiliar with event procedures, for an overview see Chip
Pearson's Events page at:

http://www.cpearson.com/excel/events.htm



--
Regards,
Norman


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
Auto run of macros immediately after opening the files gane Excel Worksheet Functions 2 October 31st 07 01:41 PM
How to stop macros opening read only files? Dave[_65_] Excel Programming 0 March 9th 06 12:26 PM
macros opening files MSHO Excel Programming 4 February 22nd 06 05:05 PM
Using VBA to disable macros when opening files [email protected][_2_] Excel Programming 10 December 13th 05 10:25 PM
Auto run macros when opening CSV files [email protected] Excel Programming 1 September 27th 03 02:38 AM


All times are GMT +1. The time now is 09:21 PM.

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

About Us

"It's about Microsoft Excel"