Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default timing sensetive code?

I have a module based subroutine which is activated by a button on a button
bar. The code loads a userform and initializes it with data before making it
visible for entry and changes. The problem I'm seeing is that my
initialization actions don't appear to work when I run normally, but when I
trap the execution and step through it, everything is working as it should,
i.e. all data is transfered as desired. But when I run it full speed, the
userform comes up blank as if not of the transfers took place. A snippet of
code from this module based code is shown below. I haven't a clue what could
be causing this problem.....

If usePS Then
.TextBox27.Value = psws.Cells(p.BuildID, usercol) 'build id
.ComboBox8.Value = psws.Cells(p.Priority, usercol) 'Priority
.ComboBox25.Value = psws.Cells(p.Sprint, usercol) 'Sprint Par found
.ComboBox9.Value = psws.Cells(p.Status, usercol) 'Status
.ComboBox3.Value = psws.Cells(p.Detect, usercol) 'detection
activity
.ComboBox17.Value = psws.Cells(p.ReTestedBy, usercol) 'ReTested By
.ComboBox28.Value = psws.Cells(p.Test, usercol) 'Test case
Else
.TextBox27.Value = ""
.ComboBox25.Value = ""
.ComboBox8.Value = "" ' having a timing problem with above
sets...
.ComboBox9.Value = ""
.ComboBox3.Value = ""
.ComboBox17.Value = ""
.ComboBox28.Value = ""
End If
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default timing sensetive code?

Try firing your initialization actions from the UserForm initialize event.
So the sequence is

Load UserForm
Initialize the controls from the UF Initialize event
UserForm Show

--

Regards,
Nigel




"TimK" wrote in message
...
I have a module based subroutine which is activated by a button on a button
bar. The code loads a userform and initializes it with data before making
it
visible for entry and changes. The problem I'm seeing is that my
initialization actions don't appear to work when I run normally, but when
I
trap the execution and step through it, everything is working as it
should,
i.e. all data is transfered as desired. But when I run it full speed, the
userform comes up blank as if not of the transfers took place. A snippet
of
code from this module based code is shown below. I haven't a clue what
could
be causing this problem.....

If usePS Then
.TextBox27.Value = psws.Cells(p.BuildID, usercol) 'build id
.ComboBox8.Value = psws.Cells(p.Priority, usercol) 'Priority
.ComboBox25.Value = psws.Cells(p.Sprint, usercol) 'Sprint Par
found
.ComboBox9.Value = psws.Cells(p.Status, usercol) 'Status
.ComboBox3.Value = psws.Cells(p.Detect, usercol) 'detection
activity
.ComboBox17.Value = psws.Cells(p.ReTestedBy, usercol) 'ReTested By
.ComboBox28.Value = psws.Cells(p.Test, usercol) 'Test case
Else
.TextBox27.Value = ""
.ComboBox25.Value = ""
.ComboBox8.Value = "" ' having a timing problem with above
sets...
.ComboBox9.Value = ""
.ComboBox3.Value = ""
.ComboBox17.Value = ""
.ComboBox28.Value = ""
End If


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default timing sensetive code?

Good Idea. I moved all the .controlsource initializing statements to the
_initialize event and it now works. Thanks.

"Nigel" wrote:

Try firing your initialization actions from the UserForm initialize event.
So the sequence is

Load UserForm
Initialize the controls from the UF Initialize event
UserForm Show

--

Regards,
Nigel




"TimK" wrote in message
...
I have a module based subroutine which is activated by a button on a button
bar. The code loads a userform and initializes it with data before making
it
visible for entry and changes. The problem I'm seeing is that my
initialization actions don't appear to work when I run normally, but when
I
trap the execution and step through it, everything is working as it
should,
i.e. all data is transfered as desired. But when I run it full speed, the
userform comes up blank as if not of the transfers took place. A snippet
of
code from this module based code is shown below. I haven't a clue what
could
be causing this problem.....

If usePS Then
.TextBox27.Value = psws.Cells(p.BuildID, usercol) 'build id
.ComboBox8.Value = psws.Cells(p.Priority, usercol) 'Priority
.ComboBox25.Value = psws.Cells(p.Sprint, usercol) 'Sprint Par
found
.ComboBox9.Value = psws.Cells(p.Status, usercol) 'Status
.ComboBox3.Value = psws.Cells(p.Detect, usercol) 'detection
activity
.ComboBox17.Value = psws.Cells(p.ReTestedBy, usercol) 'ReTested By
.ComboBox28.Value = psws.Cells(p.Test, usercol) 'Test case
Else
.TextBox27.Value = ""
.ComboBox25.Value = ""
.ComboBox8.Value = "" ' having a timing problem with above
sets...
.ComboBox9.Value = ""
.ComboBox3.Value = ""
.ComboBox17.Value = ""
.ComboBox28.Value = ""
End If


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
Help with code for timing Noemi Excel Programming 3 June 4th 07 11:37 AM
case sensetive data validation [email protected] Excel Worksheet Functions 5 January 27th 07 11:14 AM
Timing VBA code Steve M Excel Programming 2 August 25th 06 04:28 PM
Timing a macro ducttape Excel Discussion (Misc queries) 2 February 1st 06 10:23 PM
Timing loop help please Marles McDonald Excel Programming 5 September 15th 05 03:53 PM


All times are GMT +1. The time now is 06:36 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"