Excel - Alternative to Workbook_Open()????

Asked By Robert Crandal
29-Jan-10 03:04 AM
I am using the Workbook_Open() subroutine to immediately
display a userform that contains a Date&TimePicker control.
To make a long story short, the DTPicker control seems
to be having problems erasing the calendar from the background
after it is closed out.......which leads me to believe that
perhaps it is not a good idea to display modal userforms
that wait for the user to press the "Ok" button???

Just for testing purposes, what are some other ways that I
can immediately display a modal userform after a workbook
is opened???

thank u
Excel
(1)
Workbook
(1)
DateTimePicker
(1)
DTPicker
(1)
TimePicker
(1)
DoEvents
(1)
Userforms
(1)
  Jim Cone replied to Robert Crandal
29-Jan-10 11:34 AM
DoEvents will usually clean things up after closing a form.
--
Jim Cone
Portland, Oregon  USA


I am using the Workbook_Open() subroutine to immediately
display a userform that contains a Date&TimePicker control.
To make a long story short, the DTPicker control seems
to be having problems erasing the calendar from the background
after it is closed out.......which leads me to believe that
perhaps it is not a good idea to display modal userforms
that wait for the user to press the "Ok" button???

Just for testing purposes, what are some other ways that I
can immediately display a modal userform after a workbook
is opened???

thank u
  Robert Crandal replied to Jim Cone
29-Jan-10 03:33 PM
So is it generally always a good idea to run code like this:

Userform1.Show
DoEvents               ' Always after Userform1.show???


I never really noticed any problems with displaying modal
userforms until I put the Userform1.Show() code into
the Workbook_Open() subroutine and ran the file
in a server type system.
  Jim Cone replied to Robert Crandal
29-Jan-10 05:49 PM
I tend toward always using it unless the form is unloaded immediately after it is shown.
--
Jim Cone
Portland, Oregon  USA
(some useful Excel downloads at...   http://excelusergroup.org/ )



So is it generally always a good idea to run code like this:
Userform1.Show
DoEvents               ' Always after Userform1.show???
I never really noticed any problems with displaying modal
userforms until I put the Userform1.Show() code into
the Workbook_Open() subroutine and ran the file
in a server type system.
  Robert Crandal replied to Jim Cone
30-Jan-10 01:52 AM
Hi Jim....

It just occurred to me that my problem is happening WHILE
the modal dialog is displayed, not AFTER!  Therefore, running
DoEvents once the dialog box closes might not fix my problem
after all.

Basically, there is one DateTimePicker control on top of
my userform.  When the calendar graphic is opened then closed,
I noticed that the calendar graphic remains visible in the background,
almost as if it skipped a repaint step or refresh or something like that.

Do you have any other ideas as to what is going on here?

thanx
Create New Account
help
Win7 VirtualStore Weirdness with Excel 2002 and earlier Excel I thought I'd share a weird experience I had today in case it saves installer for it - - which registers it as an add-in for all installed versions of Excel - - and tested it. Fine in Windows 2000 in all installed versions of Excel. Boot to Windows XP, fine there too. Boot to Windows 7. Fine in Excel 2010, 2007, and 2003. But Excel 2002 and 2000 were still loading the old version of the add-in. I uninstalled the add-in, made sure it was gone, and reinstalled it. Same problem in Excel 2002 and earlier; still works fine in Excel 2003 and later. I opened the VB editor in Excel 2003 and in Excel 2002
32 bit DLL with 64 bit Excel 2010 Excel We have an app which creates large Excel workbooks. For example, one workbook has 1, 000 worksheets. In other cases there are fewer worksheets but the Excel file can be 80 MB or larger. Since this sometimes crashes Excel 2007 and 2003, I am considering using 64 bit Excel 2010. Would 64-bit Excel be more reliable with workbooks this size than 32-bit Excel? Is 32-bit Excel
Pb de recalcul Excel Bonjour, J'ai un problème de recalcul de ma feuille excel. J'importe une colonne qui se retrouve en texte 0000 0000 0000 0000 FFF0 7FFF cela soit automatique ? Merci d'avance à ceux qui se pencheront sur mon cas. Caroual Excel - French Discussions WorksheetFunction (1) AddIns (1) Worksheets (1) Excel 2007 (1) Macro (1) Proc (1) LEFT (1) VBA (1) Bonsoir Dans la doc sur 426a74cc@news.free.fr. . . Bonjour, J'ai un probl?me de recalcul de ma feuille excel. J'importe une colonne qui se retrouve en texte 0000 0000 0000 0000 FFF0 7FFF e ou Bonjour, D??butons par une petite explication : Auparavant sous les versions ant??rieures ?? Excel 2007, si les 2 macros compl??mentaires ("utilitaire d'analyse" ou titre d'exemple directement est diff??rente, certains pourraient bien ??prouver des difficult??s. Tous (ou presque) savent qu'Excel sous les versions pr??c??dentes ?? Excel 2007, ne fait pas la traduction des fonctions d'une langue ?? l'autre lorsqu'elles
Excel and the Math Coprocessor for DLLs Excel I have a large Win32 DLL (10 MB) that is called from my user interface (written in C++) or from VBA in MS Excel. In my user interface, the DLL runs in its own space and calculates correctly. Under Excel VBA, my DLL is having problems with double precision accuracy. The following test passes in bottom CHPTST = (DIVTWO * bottom) - top In my user interface, the chptst result is zero. Under Excel VBA, the chptst result is 0.2851266E-09. I have tried resetting the math coprocessor _status87 (); if (old87Status ! = 0) new87result = _control87 (new87ControlWord, new87ControlMask); I have verified this behavior in both Excel 2003 and 2010. Does anyone have any ideas here ? Sincerely, Lynn McGuire Excel Discussions Windows XP (1) Visual Studio 2005 (1) Microsoft Excel (1) Visual Studio (1) Excel 2010 (1) Excel 2003 (1) Excel 2007 (1) Workbooks (1
Excel VBA recommendations Excel Hello I will be jumping into writing up some excel Marcos for some of our office bean counters. Any recommendations were to get or download create forms user input, move around within workbooks, sheets, etc. Any suggestions would be helpful Excel Programming Discussions Microsoft Excel (1) Front Page (1) Excel 2003 (1) Excel 2007 (1) Outlook (1) Charts (1) Excel (1) SUMPRODUCT (1) Did you try this site? http: / / visualbasic.about.com / library / courses / blecvba20404