#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 921
Default Event: open workbook

Hi,

I want to run a macro when the workbook is opened.
I am assuming that there is an "Open workbook" event and you can insert some
code there. Does anyone know how to do this? I just want to go to a certain
"tab"/worksheet? when the user opens the workbook.

Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default Event: open workbook

Jeff, something like this,

Private Sub Workbook_Open()
Sheets("Sheet1").Select
End Sub

To put in this macro, from your workbook right-click the workbook's icon and
pick View Code. This icon is at the top-left of the spreadsheet this will
open the VBA editor to the thisworkbook module, then, paste the code in the
window that opens on the right hand side, press Alt and Q to close this
window and go back to your workbook, now this will run every time you open
the workbook. If you are using excel 2000 or newer you may have to change
the macro security settings to get the macro to run. To change the security
settings go to tools, macro, security, security level and set it to medium
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Jeff" wrote in message
...
Hi,

I want to run a macro when the workbook is opened.
I am assuming that there is an "Open workbook" event and you can insert
some
code there. Does anyone know how to do this? I just want to go to a
certain
"tab"/worksheet? when the user opens the workbook.

Thanks for your help!



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
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Open workbook hides [email protected] Excel Discussion (Misc queries) 3 May 28th 06 08:47 PM
Blank workbook opens when try to open any existing book poloboyUK Excel Discussion (Misc queries) 2 February 2nd 06 08:35 PM
Copying A Worksheet From Each Open Workbook to an new Workbook carl Excel Worksheet Functions 1 January 3rd 06 05:37 PM
cant open for workbook editing Kevin Labore Excel Discussion (Misc queries) 3 December 24th 05 01:29 AM


All times are GMT +1. The time now is 10:38 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"