Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default List box initialization

In the VBE, find the project explorer and double click on the ThisWorkbook
entry under you project.

this is where you place code for workbook level events - one of which is the
Open event which fires when the workbook is opened (and macros are not
disabled by the user).

It is best to let excel enter the declarations for these event macros,
particularly if they have arguments (which open does not).

At the top of the module select Workbook in the leftmost dropdown and in the
right most, Open

This will put in the declaration

Private Sub Workbook_Open()

End Sub

Call your macro from here or put the code directly here.

Regards,
Tom Ogilvy


"Daniel Thompson" wrote in message
...
I have a list box on a worksheet I want to initialize when
I first open the workbook. It is NOT located on a
user_form. I understand how to populate the list box. My
question is how do I get my initialization script to run
when the workbook is first opened?
Thanks Dan



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
Comparing List A to List B and add what's missing from List B Gilbert Excel Discussion (Misc queries) 2 July 20th 09 11:18 PM
validation list--list depends on the selection of first list Michael New Users to Excel 2 April 27th 06 10:23 PM
list 1 has 400 names List 2 has 4000. find manes from list 1 on 2 Ed Excel Worksheet Functions 5 September 12th 05 09:48 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM
How to control worksheet initialization upon opening a workbook Nick Excel Worksheet Functions 3 October 31st 04 04:36 PM


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