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

Neal,

Open the ThisWorkbook code module, and enter the code

Private Sub Workbook_Open()
' your code here
End Sub

This event procedure will execute when the workbook is opened.

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





"Neal" wrote in message
...
Dear experts,

I am using Excel 97. When the user opens the workbook, I
would like to have a message box appear and also clear out
some cells from a previous user. I already have the code
for the macro, but how do I have this happen when the
workbook is opened? Thanks in advance.

Neal



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
ON OPEN VBA Code input incorrectly now excel sheet wont open mmartin New Users to Excel 1 February 16th 11 11:33 PM
how can i open a second workbook using a vba code [email protected] uk Excel Discussion (Misc queries) 10 November 28th 09 05:42 PM
How to code VBA: Auto open workbook and run macro March Excel Discussion (Misc queries) 4 November 8th 07 08:25 PM
Need VB code for workbook open to open a link Daniel Baker Excel Discussion (Misc queries) 2 August 18th 06 01:30 AM
Need VBA Code to Open a Workbook in read only zulfer7 Excel Discussion (Misc queries) 1 July 10th 06 11:00 PM


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