Results 1 to 6 of 6

Thread: UserForm (XP)

  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    UserForm (XP)

    I utilize a UserForm to inform the End User the progress of the code. The code is quite simple: Update the Userform, show the userform, run some code, update the userform, repaint the userform, run some more code and etc.

    My issue is with the userform turning white upon running some code. The taskbar then displays a folder with the name of the userform. I'm not sure why the taskbar would display this and why it does not go away until final execution of the code. My thought is that all resources are being used to run the code.

    John

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: UserForm (XP)

    Do you have screenupdating off? If it is off when you close the userform, there is nothing to redraw. You could turn updating back on before the userform closes and then trun it back off later.

    Do you change the statusbar text in code to display the formname? Once you change it until you reset it it stays what you put into it.

    Steve

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm (XP)

    Steve,

    I rebooted my system and sure enough everything worked fine until the screen saver (XP logo) appeared and started bouncing on the display. Upon moving the mouse the screen returned and displayed the white userform.

    To answer your questions, the screenupdating is off and is turned on prior to closing the userform. I do change the statusbar text to display somethings but not the userform name.

    It appears to be a resource issue and I am not quite sure how to resolve it.

    John

  4. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: UserForm (XP)

    If the display gets turned off, it is not surprising that when it gets turned on again that it is not updated "properly" since you do not have screen updating on.

    As to the statusbar, have you stepped thru the code and looked to see where it "sticks" in the code for that text.

    If you run with screenupdating on do you have the same problem? I can't help feeling it is a "redrawing" issue with no updating being present.
    Steve

  5. #5
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: UserForm (XP)

    Steve,

    It is a repainting issue. I'll have to play with the refreshing of the userform in the code.

    Regards,
    John

  6. #6
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: UserForm (XP)

    John,

    Try executing the DoEvents command immediately after updating the Statusbar message.

    I do not think that Application.ScreenUpdating effects the statusbar update.

    Andrew C

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •