UserForm1 only shows Caption text, nothing else

Swaroon

Active Member
Joined
Nov 18, 2005
Messages
281
Hi,

I have a macro which loads a Userform, the form seems to load ok in that when the macro runs, I see the form appear and then disappear as per the macro instructions.

The problem is all I see on the form when it runs is the text I've entered into the caption box in the properties, nothing else is showing - I've checked that I haven't got while lines / text on a white background.

I've tried to display labels, frames etc, but nothing shows, only the caption box and what looks like an empty form below the caption.

Any ideas ?

thanks
Steve
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
If I am understanding correctly: do you have the macro running in the background while displaying a modeless userform?

If this is the case, what I do is 'repaint' the screen.
For example:
Code:
UserForm1.Show
UserForm1.Repaint
'code runs
Unload UserForm1

The explanation of repaint from the VBA help file:
Updates the display by redrawing the form or page.
...
The Repaint method is useful if the contents or appearance of an object changes significantly, and you don't want to wait until the system automatically repaints the area.
 

Swaroon

Active Member
Joined
Nov 18, 2005
Messages
281
Hi Kirsty,

You were correct - macro running in the background while displaying a modeless userform - I used your code and the userform now displays.

Thanks for yor help, really appreciate it.

Steve
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,561
Messages
5,832,507
Members
430,136
Latest member
Asir Jefferson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top