User Form Problem

B

Brian

We have a workbook with several sheets in it. I created a User form for Data
that is used several times through-out the workbook.

I used the following code to get the User Form to load, but only a blank
screen shows.

Sub callUF()
UserForm1.Show
End Sub

When I go to VBA Project I look under User form and it is there exactly as
it was designed. What am I doing wrong?

Is there anyway to get the User Form to Show up as the 1st sheet in the
wookbook.

The goal of this is so we only have to enter the data 1 time and the User
form places the data in the correct Sheet and cell for us.

There are about 50 Text Boxes in our user form, but they should all have
same code, the only thing that will change is the Sheet and cell ID. Any help
with code with be great. That way I can Cut/Paste it into each Text Box
(Code) and change the sheet & Cell ID.
 
S

Sanjay

Hi Brian,

I think, you need to check the name of the userform. Please confirm the name
of the form that you wanted to show if you are having many forms. (Select
UserForm>Press F4>Check the Name attribute value).

Also if you want to use it in your sheet 1 then you can do it two ways..

1)
Private Sub Worksheet_Activate()
UserForm1.Show
End Sub

2)
Private Sub Workbook_Open()
Sheet1.Activate
UserForm1.Show
End Sub


Regards,
Sanjay
 
B

Brian

The User form Opens when I open the Workbook, but the Screen is still Blank &
it opens as a seperate screen, not as sheet1. Under Properties - UserForm1,
Name Attribute=UserForm1

I used the following
Private Sub Workbook_Open()
Sheet1.Activate
UserForm1.Show
End Sub

In the code window I have in the box to the left=Workbook Box to the
right=Open

I am new to this, but really want to learn it. What is the best way to learn
how to do all this stuff on my own.

Thanks
Brian
 

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