Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Open Workbook with Macros

Hi Dave,

Try something like:

'=============
Private Sub Workbook_Open()
'Your code, e.g.:
MsgBox "Hi"
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.

For an overview of Event procedures see Chip Pearson's Events page at:
http://www.cpearson.com/excel/events.htm


---
Regards,
Norman



"Dave" wrote in message
...
I need to create a macro that when ran will open one specific workbook.
The
workbook's name will not change and will be located in the same place on a
server, which will not change. Can aynone help me? Thanks.



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
Open workbook using VBA but don't run macros Paulymon Excel Programming 1 October 10th 06 04:12 AM
Open workbook without running Macros Raul[_2_] Excel Programming 2 May 27th 06 02:51 PM
Turn Off Macros With Workbook Open Paul Moles Excel Programming 8 October 19th 04 08:01 AM
Open workbook-macros enabled, opening another with macros George J Excel Programming 5 September 17th 04 02:07 PM
Open workbook - prevent macros Charles Excel Programming 0 June 23rd 04 08:46 PM


All times are GMT +1. The time now is 11:18 PM.

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"