Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Quick and Easy!

What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the
Excel file is first opened? Workbook_Open() something or other????

DBAL
Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default Quick and Easy!

Private Sub Workbook_Open()

End Sub

Pasted in the ThisWorkbook Object in the VBE
Right Click on Excel Icon in the upper left of the Excel Window and choose
View Code. Paste this code.

HTH

"DBAL" wrote:

What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the
Excel file is first opened? Workbook_Open() something or other????

DBAL
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Quick and Easy!

Ahh man, so that's the problem, I had the right code, but I guess it was in
the wrong place! So the workbook code is kept in a different spot then...
Thanks!

"Jim Thomlinson" wrote:

Private Sub Workbook_Open()

End Sub

Pasted in the ThisWorkbook Object in the VBE
Right Click on Excel Icon in the upper left of the Excel Window and choose
View Code. Paste this code.

HTH

"DBAL" wrote:

What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the
Excel file is first opened? Workbook_Open() something or other????

DBAL
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Quick and Easy!

you can also use

Sub Auto_Open()
' your code
End SUb

in a standard module

"DBAL" wrote:

What is the proper 'Sub' - 'End Sub' Syntax to make some VBA run when the
Excel file is first opened? Workbook_Open() something or other????

DBAL
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
Looking for a easy and quick way to share a workbook only with mys OldRetiredGuy Excel Discussion (Misc queries) 1 November 24th 09 05:09 AM
Quick/Easy Question? Dave Excel Discussion (Misc queries) 2 February 24th 09 06:44 PM
is there a quick easy way to input time? typographically challenged Excel Worksheet Functions 2 April 17th 08 12:22 AM
Quick and easy labeling mmednick Excel Discussion (Misc queries) 4 December 7th 05 01:12 AM
Quick and easy chisigs2 Excel Worksheet Functions 2 August 24th 05 08:36 PM


All times are GMT +1. The time now is 09:02 AM.

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"