Workbook_Activate() vs Workbook_Open()

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


0
Robert
11/21/2009 12:41:23 AM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
1420 Views

Similar Articles

[PageSpeed] 3

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 doesn't matter too much.



"Robert Crandal" <nobody@gmail.com> wrote in message 
news:UGGNm.4602$kY2.4462@newsfe01.iad...
> 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
>
> 


0
JLGWhiz
11/21/2009 12:51:44 AM
Reply:

Similar Artilces:

wizard in VS.NET
I just started using VS Studio.NET instead of VS Studio 6.0. In a C++ (MFC) project, I found a wizard to add a variable corresponding to a IDC_xx. But is it possible with a wizard to modifie or suppress this variable in the 2 files (.h , .cpp) ? Thanks Jack no, the wizard will not remove/modify member or control varibles, you'll have to search/find and delete the varibles yourself. Joe # "jjs" <alvend@normandnet.fr> wrote in message news:bh6d6f$g10$3@news6.isdnet.net... > I just started using VS Studio.NET instead of VS Studio 6.0. > In a C++ (MFC) project, I...

Outlook vs. Lotus Notes in macros
One problem... we use Lotus Notes can I just replace LotusNotes where it says Outlook? "Gary Brown" wrote: > Use Windows Scheduled Tasks to run your macro at specific times/days. > The basics of the macro would be something like this.... > > '/========================================/ > ' Sub Purpose: example of how to send a file attachment > ' Requires reference to Microsoft Outlook > '/========================================/ > ' > Public Sub SendTheEmail() > Dim olApp As Outlook.Application ...

Page Size vs Paper Size
How should a 4x6 in Landscape document be set-up? Should I set the Paper Size first or the Page size? Also, it is important to note that while I want the document to print in lanscape mode, the paper must be fed into the printer in portrait orientation because of its small size. Your printer needs to be setup first. What version Publisher? -- Mary Sauer http://msauer.mvps.org/ "SpillerBD" <SpillerBD@discussions.microsoft.com> wrote in message news:37426CE0-5B15-4DFF-8FC3-E7829F457E44@microsoft.com... > How should a 4x6 in Landscape document be set-up? > Should I se...

Excel 2000 vs XP vs 2003
Anybody know where I can find a definitive list of changes to Excel 2000, XP and 2003. Is there a better resource? I have tried this, but I'm looking for more information. http://www.microsoft.com/office/editions/prodinfo/compare. mspx THANKS! :) Hi maybe not a 'definitive' list but have a look at: http://www.pcworld.com/reviews/article/0,aid,49607,00.asp http://j-walk.com/ss/excel/xl2003.htm -- Regards Frank Kabel Frankfurt, Germany Erica Smith wrote: > Anybody know where I can find a definitive list of > changes to Excel 2000, XP and 2003. Is there a better ...

VS6 vs. VS .Net
Dear all. I'm a bit baffled by all this talk of the .Net framework and managed code. I'm a VC6 programmer but all the jobs in my area are quickly turning to some .Net flavour. Can someone point me to a quick overview of what migrating to .Net will do for me? Thanks If your not developing C# .Net applications not much. "Zardoz" <thing@thing.thing> wrote in message news:tpn2nvgiacj7rlcebt7nkmllrsb9ds81qe@4ax.com... Dear all. I'm a bit baffled by all this talk of the .Net framework and managed code. I'm a VC6 programmer but all the jobs in my area are qui...

global vs local procedure
I have a distributed app with quite a bit of VBA for the different forms and reports, as well as some global code in modules. My question is actually in two-parts: first, if I have two fields I want to perform some data verification on in the OnBeforeUpdate event and the resulting code is almost identical except for field names, can I modify and put the code in one of the global modules to eliminate the duplicate subroutine? second, in a more general vein, what's the advantage of local routines over global routines? is it more than just pre-defined scope? Thanks! You only need t...

C++ / VS 2005 App runs in Debug, Not in release mode
I have a C++ application (dialog based) that I imported into VS 2005. When I run in debug mode, everything works fine. When I try to run it in release mode, things go badly. The main app calls opens a dialog box. In release mode, the constructor works fine, the subsequent pMyApp->MyInitDialog->DoModal() bombs Initially, I simply had MyInitDialog:: OnInitDialog() { :: AfxMessageBox(" Hi From InitDialog OnInitDialog()", NULL, NULL); CDialog:: OnInitDialog(); .... } The message box above never appeared. I added a method PreInitDialog() M...

Retainer vs. Project vs. Contract
Our business bills a flat retainer fee every month for every customer. This fee is based on an hourly rate and an agreed number of hours. Separately, if we exceed our retainer, we send a seperate 'overtime' invoice to the customer the following month. In GP 9.0, we are confused with their terminology (i.e. retainer, contract, project, etc.) and how it applies to the the above description. Does anyone have any suggestion on how we should configrue GP for our business? Thanks A contract is the overall job or maybe in your case a specific service or work order for your customer. Pr...

Workbook_Activate() vs Workbook_Open()
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 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 even...

2003 vs 2007 Chart problem
When using Excel 2003 I asked this question: "I have a sheet with 2 charts which get their data from some calculated cells that I'd really like to hide, but when I hide them, the chart dissappears. Even making the columns 0 width does this" ....and this was the answer that worked for me: "You need to change the properties of the chart object. Hold the SHIFT key whilst selecting the chart. This should give you a set of white square handles. Press <CTRL+1> to bring up the format dialog. On the Properties dialog select the option Do not move & size with cells. Now ...

Contacts vs Addressbook
Running Windows XP Home Edition and Outlook 2000. It "appears" that Contacts and Addressbook are synchronized. I need to be able to have Contacts contain phone information for my Palm download and Address Book contain e-mail addresses. HOW can I make the distinction??? Thanks.................Dr Bob this is going to be more of a concern through your PDA sync software as opposed to actual Outlook... i.s. >-----Original Message----- >Running Windows XP Home Edition and Outlook 2000. > >It "appears" that Contacts and Addressbook are >synchronized. I ...

Problem with VS.Net Class View
Hello All I am working on a relatively large application suite consisting of around 20 VC++ Projects. We have created a solution and added all the projects to it. I am facing problems while using auto hide feature of VS.Net 2003 Class View. Every other tab like solution explorer etc are working fine but the class view takes a lot of time to display. Auto hide is a very cool feature but because of the time delay in loading the class view i can not use it properly (it takes a lot of time to parse the classes being diaplyed). Has any one faced this problem and is there any solution availabl...

WLM vs Hotmail
I posted a question a few days ago about WLMD and got a reply which included the mention of the D having been dropped some time ago which begs the question how does one tell the versions? Or, maybe I'm mistaken but when I go online and log into my ID, it's listed as Windows Live Mail. I had thought the former Hotmail and MSN mail were being merged into the new Live Mail but if the desktop version is also Windows Live Mail, I must be mistaken. Hotmail, MSN Mail, etc were created originally as web-based mail services. Traditionally, a subscriber would use a web-browser...

VS 2005 vs VS 2002
Is it worth upgrading to VS.net 2005 from our VS.net 2002 Enterprise? All we can seem to get into 2002 are monochrome, 16 colour and 256 colour icons. So can 2005 handle Vista icons with alpha channel colours? Or is the problem that we are running on XP? > Is it worth upgrading to VS.net 2005 from our VS.net 2002 Enterprise? > > All we can seem to get into 2002 are monochrome, 16 colour and 256 colour > icons. So can 2005 handle Vista icons with alpha channel colours? Or is the > problem that we are running on XP? I dont have any idea about the specific issue you wrote. ...

Outlook preview vs normal mode
Outlook 2007. When you open an email with attachments you can see the body of the email. When you click on an attachment the email goes into a preview mode of some kind, with a list of attachments and previews of the attachments, but you can't see the email text any more. Without closing the email and reopening it, how do you go back to the normal view? "M Skabialka" <mskabialka@NOSPAMdrc.com> wrote in message news:e17bn91xKHA.5576@TK2MSFTNGP05.phx.gbl... > Outlook 2007. When you open an email with attachments you can see the body > of the ...

Exchange vs Sharepoint
Currently using GP 8.0. I will be purchasing a new HP DL380, 2.0, 8 Geg ram. I need to share Outlook calenders. I have no need for Exchange mail functions (I use a pop server). I have a small business and I do not need any of Sharepoint's "workflow" features. In relation to the new capabilities of GP version 10, what are the benefits of purchasing Exchange with out Sharepoint? Thank you. Your comment "I have no need for Exchange mail functions (I use a pop server). " sort of sums it up. That is what Exchange does, email. And if you have no use for Sharepoint...

Outlook 2000 SP3
There has been so much hype about email worms/ viruses but I still don't understand everything I'd like to. When an email arrives in my Inbox, it will display in the preview pane as soon as I single click in the message header in the Header pane. My question is: Is that equivalent to opening the mail message and therefore launching whatever script/ executable is embedded in the body of the email? I'm concerned because any HTML type messages will instantly begin to render simply by single click and preview. Given concerns about HTML based spyware, worms, etc. I'm thinking the...

2003 vs 2007
I have a template that was created in 2003. Then I did a bunch of updates in 2007 but in compatible mode. In order to do the drop-downs, etc., in tables, I had to go back to 2003. Now, when I open the template in 2007, lots of features such as editing the header/footer are not available. Why is that? It appears that if I use 2003 to edit you can no longer use 2007 for full editing. Please let me know what I'm doing wrong. Thanks, -- Barbara R If this is a protected form, you will find the form tools on Word 2007's Developer Tab (which is not displayed by default...

ISA Server 2004 vs Checkpoint with Exchange 2003
As we all know, MS now recommends installing a front-facing ISA Server and leaving your frontend on your internal network, rather than the old, less-secure method of putting a frontend in a DMZ. MS's big argument for ISA Server even when you have another firewall (e.g. a PIX) is stateful inspection. Checkpoint also offers stateful inspection and in fact pioneered it. Pricing aside -- say you already have Checkpoint Firewall or have a good relationship with them for pricing -- what would be the compelling reasons to choose ISA Server 2004 instead, or would there be any? I haven't been a...

Cost Variance posting in 7.5 vs 9.0
My client just upgraded from 7.5 to 9.0. When they do a PO shipment receipt for an item where a cost override exists, 9.0 is automatically making and posting cost variance adjustments to the GL. In 7.5, the adjustments printed on the journal but had to be made manually in GL. Is this new functionalty in 9.0? Is there a way to turn off posting to GL just for cost variances? Thanks! This is a new feature in version 9.0. One of the weaknesses of GP 8.0 and lower was the calculation of average costs in inventory. As you know, the average cost of an item will change when inventory is rec...

Budget vs. Cash Flow
Hi, Thanks for taking time to review my question (and it might be a stupid one). I'm using (just installed for the first time) MS Money 2004 Premium. It seems Budget and Cash Flow are duking it out, and Cash Flow is winning. What I mean is to ask is, is it possible to create a budget that balances out fine according to one's income, yet Cash Flow shows that the sum of flow will gradually go farther and farther into the red every month? Or, is it that the Cash Flow is independant, and I have to tell it that everything is going to be alright? Btw, I've already setup reoccuring deposi...

Print Preview
Hi, I had posted this earlier. But no answer. I wish to request for help again. --------------------------------------------------------------------------------------------------------- I recently just tried to upgrade a VC++6.0 app to a VC++7.1 version (ie. Net). I found one difference in the Print Preview. In 6.0, the print preview fills up the whole app, i.e it fills up the MDI main frame window. But when I ported my app to 7.1, it fills up the MDI Child frame instead. Now I did a search and it seemst hat microsoft has been changing this behavior back and forth since V4.x onwards. I al...

2003 vs previous version
Hi, I use MSNStockQuote functions in 2002 version. Now, it seems no longer exists in 2003. I can use the smart tags, but it works entirely differently. Wonder if anyone knows if I am missing something or MS does it again, like the new ASP.net does not back support ASP...! -- thanks in advance for your input, EM I don't have 2003 but it might help to do a windows find on *iqy to see where they are in 2002 and in 2003. Copy over or download? I really don't know if this will help but it's what I would try. BTW, I use Yahoo and download quotes with an query instead of the iq...

CRM 3.0 Units vs Teams vs Territories Which to Use
We recently certified on CRM 3.0 and now have a major debate going on as to what should be defined as a Business Unit, Territory or Team or even Site. For example, we have two offices: east (also Head Office) and west. We have a large sales group in the East office and groups of service staff: consulting, professional, technical, infrastructure, training as wel as Coporate (Finance,HR, Admin). We are a major IT Reseller and service provider. It has been suggested that teams should be more temporary or smaller sections of units. Any advice on what should be a business unit: just...

Archive Settings for Inbox vs Subfolders
Can I set up one Archive setting for the main Inbox and different archive settings for its subfolders (those folders that were created under the Inbox)? I want ot delete all messages over 365 days old in the Inbox but archive those ove 365 in all of the subfolders. I want to make sure that Outlook will not delete those older messages in the subfolders. Thanks. Denny Riffert Yes. Right click on the folders and choose properties then a new archive setting. See http://www.slipstick.com/tutorials/auto/archive.htm if you need help doing it. -- Diane Poremsky [MVP - Outloo...