Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Alternative to Workbook_Open()????

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Alternative to Workbook_Open()????

DoEvents will usually clean things up after closing a form.
--
Jim Cone
Portland, Oregon USA


"Robert Crandal"
wrote in message ...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default Do Events

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" wrote in message
...

DoEvents will usually clean things up after closing a form.
--
Jim Cone
Portland, Oregon USA


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Do Events

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/ )



"Robert Crandal"
wrote in message ...
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"
wrote in message ...
DoEvents will usually clean things up after closing a form.
--
Jim Cone
Portland, Oregon USA

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default DTPicker control bug

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

"Jim Cone" wrote in message
...

DoEvents will usually clean things up after closing a form.
--
Jim Cone
Portland, Oregon USA



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
Alternative to IF Dave P[_2_] Excel Worksheet Functions 7 March 28th 08 05:00 PM
Workbook_Open Mangus Pyke Excel Programming 13 September 12th 06 06:15 PM
If alternative Busy Bee Excel Worksheet Functions 4 June 30th 06 12:53 AM
Workbook_Open () Bill Martin Excel Discussion (Misc queries) 12 December 20th 05 05:37 PM
Workbook_Open() will not run Jack Sheet Excel Programming 11 December 9th 04 09:04 AM


All times are GMT +1. The time now is 06:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"