Userform is blank

C

ChrisP

I have a worksheet which has a button. When the button is pushed it shows a
userform, the userform code calls other sub to run. My problem is that the
userform is not showing up correctly. The title is showing but the inside of
the form is completely white (which is not what I made).

Here is my code:

Button code:
Private Sub CommandButton1_Click()
UserForm1.Show
End Sub

UserForm code:
Private Sub UserForm_Activate()
Call testing
End Sub

Testing code (which is in a Module):
Sub testing()
Workbooks.Open Filename:="\xxx\Template.xls", UpdateLinks:=0
ActiveWorkbook.Close
Unload UserForm1
End Sub

How do I make the middle of the form visible? What am I doing wrong?
Thanks,
Chris P
 
R

ryguy7272

I don't think it has anything to do with the code. Right-click the Form and
click on Properties. Look in the window that opens (lower left corner of the
screen). Look at BackColor, click the down arrow... System? Palette? Does
any of that work for you?


Regards,
Ryan---
 
C

ChrisP

Those both have colors selected, even if I change the background color it
still shows up blank when I click the button. I had some words in it but
those aren't showing up either.
 
J

Jim Cone

In the Userform_Activate code, add this as the first line...
Me.Repaint

note: when you open a workbook it becomes the active workbook.
--
Jim Cone
Portland, Oregon USA



"ChrisP"
wrote in message
I have a worksheet which has a button. When the button is pushed it shows a
userform, the userform code calls other sub to run. My problem is that the
userform is not showing up correctly. The title is showing but the inside of
the form is completely white (which is not what I made).

Here is my code:

Button code:
Private Sub CommandButton1_Click()
UserForm1.Show
End Sub

UserForm code:
Private Sub UserForm_Activate()
Call testing
End Sub

Testing code (which is in a Module):
Sub testing()
Workbooks.Open Filename:="\xxx\Template.xls", UpdateLinks:=0
ActiveWorkbook.Close
Unload UserForm1
End Sub

How do I make the middle of the form visible? What am I doing wrong?
Thanks,
Chris P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top