Consulting

Results 1 to 4 of 4

Thread: text box

  1. #1

    text box

    hi
    i have a userform with a text box in it, but i would like it to display data from a cell in a ws rather than the user typing data in to it, is this possible?
    thanks ash

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Private Sub Userform_Activate()

    Me.TextBox1.Text = Worksheets("Sheet1").Range("A1").Text
    End Sub
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Master
    Joined
    Jun 2007
    Location
    East Sussex
    Posts
    1,110
    Location
    You can also set the controlsource of the textbox to the address of the cell you want. Set the textbox's Locked property to True if you don't want the user changing the contents of the cell.
    Reegards,
    Rory

  4. #4
    thanks very much both of u, good job!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •