UserForm1 only shows Caption text, nothing else

Swaroon

Active Member
Joined
Nov 18, 2005
Messages
278
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
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

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
278
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
 

Watch MrExcel Video

Forum statistics

Threads
1,123,057
Messages
5,599,550
Members
414,316
Latest member
ExcelLee

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