Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default loading a form

I have created a form that have a treevie control. This treeviw control is
populated with information coming from a recordset.
In the code view of the form I have a sub (Private Sub
userform_initialize()) that call a couple of subs (a sub that populate the
treeview).
My problem is that I would like to have the form diplayed on the screen
while the sub populate the treevview. The problem is that only when the sub
userform_iunitialize is finished the Form appaers.
I have in the module a sub (sub form_load()) that have the following line
userform1.show. When I call this sub from userform_initialize, the form is
displayed but the program stops (like it is in Pause)

Any hint woiuld be welcome. In fact I want to display the form while is
populating because I have a progressbar that I want to show while my program
is parsing my database (using the PercentPosiion property of my recordset)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default loading a form

You could fire the loading code from within another macro triggered by
OnTime within the userform initialize. Something like

Private Sub UserForm_Initialize()
Application.OnTime Now + TimeSerial(0, 0, 1), "loadForm"
End Sub

The loadForm macro should be in a standard code module, and should run the
loading subs of yours.

--
HTH

Bob Phillips

"stabilo" wrote in message
...
I have created a form that have a treevie control. This treeviw control is
populated with information coming from a recordset.
In the code view of the form I have a sub (Private Sub
userform_initialize()) that call a couple of subs (a sub that populate the
treeview).
My problem is that I would like to have the form diplayed on the screen
while the sub populate the treevview. The problem is that only when the

sub
userform_iunitialize is finished the Form appaers.
I have in the module a sub (sub form_load()) that have the following line
userform1.show. When I call this sub from userform_initialize, the form

is
displayed but the program stops (like it is in Pause)

Any hint woiuld be welcome. In fact I want to display the form while is
populating because I have a progressbar that I want to show while my

program
is parsing my database (using the PercentPosiion property of my recordset)



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
Loading Form on Startup II nca-wom Excel Programming 1 April 1st 05 03:22 PM
Loading Excel Data into a Form DLayne Excel Programming 2 November 4th 04 10:35 AM
VBA - Loading a certain page when firing up a form khot78 Excel Programming 2 August 10th 04 05:42 PM
Loading values into a form on open. J. Vandenberg Excel Programming 3 September 28th 03 03:38 AM
Auto loading of a user form sometimes -\) Excel Programming 1 August 2nd 03 12:32 AM


All times are GMT +1. The time now is 05:39 PM.

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"