Excel - Workbook_Activate() vs Workbook_Open()

Asked By Robert Crandal
20-Nov-09 07:41 PM
So, when a user opens my Excel file, my Visual Basic script
is going to automatically fill the cells on the current sheet with
predetermined values....

My question is, does it make a difference if I place my
auto fill code into the Workbook_Activate() function
as opposed to the Workbook_Open() function??
I know that Workbook_Open() gets called before
Workbook_Activate()....so does it really matter WHERE
I place my initilization/auto fill code??

Thank you
Excel
(1)
Workbook
(1)
Autofillthe
(1)
Autofill
(1)
Yoiu
(1)
  JLGWhiz replied to Robert Crandal
20-Nov-09 07:51 PM
If you put it in the WB Open event, it only runs that one time to autofill
the cells.  But if yoiu use the Activate event, it will run every time you
return to that workbook from another file triggering the activate event.
Other than that it probably does not matter too much.
Create New Account
help
make changes to excel workbook Excel hi I have a program on my computer that is using an Excel workbook. I'm using VB6 and need to modify this excel workbook. How can I make changes to this excel workbook without saving it first to the hard drive and afterward reopen it. thanks Excel
make changes to excel workbook Excel hi I have a program on my computer that is using an Excel workbook. I'm using VB6 and need to modify this excel workbook. How can I make changes to this excel workbook without saving it first to the hard drive and afterward reopen it. thanks Excel
excel macro to copy the word document to new excel workbook Excel I need Excel macro to copy the word document data's to a new excel workbook. Excel Programming Discussions Application (1) Error (1) Excel (1) Range (1) Hi You can try developing
excel Excel excel Excel Discussions Excel (1) ExcelSalesAid (1) GuillettMicrosoft (1) SalesAid (1) Dguillett1 (1) I will certainly try to - - Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com keywords: excel description: excel