Programming a user form

Hi there,

I have a user for which i would like to have get information from a cell in another sheet. The below code does not seem to work. it loads but no information from the cell range?

Private Sub PPMB1()
UserForm1.Show
TextBox1 = Worksheets("Database").Range("A4")
TextBox2 = Worksheets("Database").Range("B4")
TextBox3 = Worksheets("Database").Range("S4")
End Sub

thanks
Runner77

Comments

  • Hi,
    You need to select the cell and then get the value.

    Worksheets("Database").Range("A4").Select
    TextBox1 = Worksheets("Database").Range("A4").Value


    Hope this helps!
    -Jaime
    www.programmerssolutions.com
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion