Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Problem loading userform with frames

I added several new controls to a userform and found that there was a
noticable increase in the time it took to load. I removed the controls one
at a time and was able to isolate the problem to two frames on the userform.
I did some additional testing with a new userform on which I only attached
frames. When I put only one frame on the userform it loaded in 15
milliseconds while two frames took 140-165 milliseconds. I know this isn't a
long delay, but it is annoying that the form does not load "instantaneously."
From a performance perspective, two frames was approximately 8-10 times
slower than one. I tested other controls and each additional control had
almost no impact on the load time of the form. Has anyone else experienced a
similar situation with frames? Is there a way to avoid/correct this? Any
help would be greatly appreciated.

Dan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Problem loading userform with frames

Dan,

Try Rob Bovey's code cleaner utility on your project. Once forms start
getting complex, it is a huge help.

--
Robin Hammond
www.enhanceddatasystems.com


"Dan Hatola" wrote in message
...
I added several new controls to a userform and found that there was a
noticable increase in the time it took to load. I removed the controls
one
at a time and was able to isolate the problem to two frames on the
userform.
I did some additional testing with a new userform on which I only attached
frames. When I put only one frame on the userform it loaded in 15
milliseconds while two frames took 140-165 milliseconds. I know this
isn't a
long delay, but it is annoying that the form does not load
"instantaneously."
From a performance perspective, two frames was approximately 8-10 times
slower than one. I tested other controls and each additional control had
almost no impact on the load time of the form. Has anyone else
experienced a
similar situation with frames? Is there a way to avoid/correct this? Any
help would be greatly appreciated.

Dan



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Problem loading userform with frames

Thanks. I gave the code cleaner a try, but unfortunately nothing changed.
Even if I only have 2 frames and no other controls, the user form loads
slower. I might try to test it on other computers as well as other version
of Excel. I am running 2002 on the computer I used to create the user form.

Dan

"Robin Hammond" wrote:

Dan,

Try Rob Bovey's code cleaner utility on your project. Once forms start
getting complex, it is a huge help.

--
Robin Hammond
www.enhanceddatasystems.com


"Dan Hatola" wrote in message
...
I added several new controls to a userform and found that there was a
noticable increase in the time it took to load. I removed the controls
one
at a time and was able to isolate the problem to two frames on the
userform.
I did some additional testing with a new userform on which I only attached
frames. When I put only one frame on the userform it loaded in 15
milliseconds while two frames took 140-165 milliseconds. I know this
isn't a
long delay, but it is annoying that the form does not load
"instantaneously."
From a performance perspective, two frames was approximately 8-10 times
slower than one. I tested other controls and each additional control had
almost no impact on the load time of the form. Has anyone else
experienced a
similar situation with frames? Is there a way to avoid/correct this? Any
help would be greatly appreciated.

Dan




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Problem loading userform with frames

Indeed loading a form with even one frame takes relatively a long time, try
this

'normal Module
Public Declare Function GetTickCount Lib "kernel32.dll" () As Long

Sub test()
Dim i&, t&
Dim frm As UserForm

' test with empty form to get base time
' then only with some buttons
' then only with some frames

t = GetTickCount
For i = 1 To 50
Set frm = UserForm1
Load frm ' redundant
Unload frm
Set frm = Nothing
Next

Debug.Print GetTickCount - t

End Sub

For me, two buttons in addition to time loading an empty form was trivial,
but two frames a long time.
FWIW, 3 x longer than with only one frame.

Regards,
Peter T

"Dan Hatola" wrote in message
...
Thanks. I gave the code cleaner a try, but unfortunately nothing changed.
Even if I only have 2 frames and no other controls, the user form loads
slower. I might try to test it on other computers as well as other

version
of Excel. I am running 2002 on the computer I used to create the user

form.

Dan

"Robin Hammond" wrote:

Dan,

Try Rob Bovey's code cleaner utility on your project. Once forms start
getting complex, it is a huge help.

--
Robin Hammond
www.enhanceddatasystems.com


"Dan Hatola" wrote in message
...
I added several new controls to a userform and found that there was a
noticable increase in the time it took to load. I removed the

controls
one
at a time and was able to isolate the problem to two frames on the
userform.
I did some additional testing with a new userform on which I only

attached
frames. When I put only one frame on the userform it loaded in 15
milliseconds while two frames took 140-165 milliseconds. I know this
isn't a
long delay, but it is annoying that the form does not load
"instantaneously."
From a performance perspective, two frames was approximately 8-10

times
slower than one. I tested other controls and each additional control

had
almost no impact on the load time of the form. Has anyone else
experienced a
similar situation with frames? Is there a way to avoid/correct this?

Any
help would be greatly appreciated.

Dan






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Problem loading userform with frames

Thanks for following up. I guess there is just an issue with frames and load
time of the user form.

Dan

"Peter T" wrote:

Indeed loading a form with even one frame takes relatively a long time, try
this

'normal Module
Public Declare Function GetTickCount Lib "kernel32.dll" () As Long

Sub test()
Dim i&, t&
Dim frm As UserForm

' test with empty form to get base time
' then only with some buttons
' then only with some frames

t = GetTickCount
For i = 1 To 50
Set frm = UserForm1
Load frm ' redundant
Unload frm
Set frm = Nothing
Next

Debug.Print GetTickCount - t

End Sub

For me, two buttons in addition to time loading an empty form was trivial,
but two frames a long time.
FWIW, 3 x longer than with only one frame.

Regards,
Peter T

"Dan Hatola" wrote in message
...
Thanks. I gave the code cleaner a try, but unfortunately nothing changed.
Even if I only have 2 frames and no other controls, the user form loads
slower. I might try to test it on other computers as well as other

version
of Excel. I am running 2002 on the computer I used to create the user

form.

Dan

"Robin Hammond" wrote:

Dan,

Try Rob Bovey's code cleaner utility on your project. Once forms start
getting complex, it is a huge help.

--
Robin Hammond
www.enhanceddatasystems.com


"Dan Hatola" wrote in message
...
I added several new controls to a userform and found that there was a
noticable increase in the time it took to load. I removed the

controls
one
at a time and was able to isolate the problem to two frames on the
userform.
I did some additional testing with a new userform on which I only

attached
frames. When I put only one frame on the userform it loaded in 15
milliseconds while two frames took 140-165 milliseconds. I know this
isn't a
long delay, but it is annoying that the form does not load
"instantaneously."
From a performance perspective, two frames was approximately 8-10

times
slower than one. I tested other controls and each additional control

had
almost no impact on the load time of the form. Has anyone else
experienced a
similar situation with frames? Is there a way to avoid/correct this?

Any
help would be greatly appreciated.

Dan








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Problem loading userform with frames

Dan,
Frames, along with a only couple of other standard controls, expose a
windows handle. Most others do not, they are under Excel's control.
Not sure if this is involved in the behaviour that you see, but some testing
with various controls and Spy++ may give you some insight.

NickHK

"Dan Hatola" wrote in message
...
Thanks for following up. I guess there is just an issue with frames and

load
time of the user form.

Dan

"Peter T" wrote:

Indeed loading a form with even one frame takes relatively a long time,

try
this

'normal Module
Public Declare Function GetTickCount Lib "kernel32.dll" () As Long

Sub test()
Dim i&, t&
Dim frm As UserForm

' test with empty form to get base time
' then only with some buttons
' then only with some frames

t = GetTickCount
For i = 1 To 50
Set frm = UserForm1
Load frm ' redundant
Unload frm
Set frm = Nothing
Next

Debug.Print GetTickCount - t

End Sub

For me, two buttons in addition to time loading an empty form was

trivial,
but two frames a long time.
FWIW, 3 x longer than with only one frame.

Regards,
Peter T

"Dan Hatola" wrote in message
...
Thanks. I gave the code cleaner a try, but unfortunately nothing

changed.
Even if I only have 2 frames and no other controls, the user form

loads
slower. I might try to test it on other computers as well as other

version
of Excel. I am running 2002 on the computer I used to create the user

form.

Dan

"Robin Hammond" wrote:

Dan,

Try Rob Bovey's code cleaner utility on your project. Once forms

start
getting complex, it is a huge help.

--
Robin Hammond
www.enhanceddatasystems.com


"Dan Hatola" wrote in message
...
I added several new controls to a userform and found that there was

a
noticable increase in the time it took to load. I removed the

controls
one
at a time and was able to isolate the problem to two frames on the
userform.
I did some additional testing with a new userform on which I only

attached
frames. When I put only one frame on the userform it loaded in 15
milliseconds while two frames took 140-165 milliseconds. I know

this
isn't a
long delay, but it is annoying that the form does not load
"instantaneously."
From a performance perspective, two frames was approximately 8-10

times
slower than one. I tested other controls and each additional

control
had
almost no impact on the load time of the form. Has anyone else
experienced a
similar situation with frames? Is there a way to avoid/correct

this?
Any
help would be greatly appreciated.

Dan








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
How do I subtract time where hh:mm:ss:ff (frames = 30 frames/sec) KJ7 Excel Discussion (Misc queries) 14 December 3rd 16 10:03 AM
Loading userform problem Mats Nilsson Excel Programming 2 October 25th 06 02:06 PM
Multiple Frames on a userform James McDowell[_2_] Excel Programming 3 May 3rd 05 05:20 AM
Problem with Frames in userform JUAN Excel Programming 2 October 27th 04 12:13 AM
overlaying frames on a userform Mike[_49_] Excel Programming 0 January 28th 04 11:41 PM


All times are GMT +1. The time now is 10:17 PM.

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"