+ Reply to Thread
Results 1 to 7 of 7

value of a cell into a text box

Hybrid View

  1. #1
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Which cell contains the value? You can simply use the UserForm_Initialize event to populate a TextBox

    Private Sub UserForm_Initialize()
    Me.TextBox1.Value = Sheet1.Cells(1, 1).Value
    End Sub
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  2. #2
    Forum Contributor
    Join Date
    07-10-2008
    Location
    UK
    Posts
    220
    ok my sheet is called 'CORRECT FORMAT' and the cell is AO7


    so what should the formula be?

    sorry, im just useless with formulas.

    Thanks

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You aren't using formulas in a userform. Do you mean a VBA userform?

  4. #4
    Forum Contributor
    Join Date
    07-10-2008
    Location
    UK
    Posts
    220
    sorry i didnt mean to say formulas lol.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I think this is what you want

    Private Sub UserForm_Initialize()
    Me.TextBox1.Value = Sheet("CORRECT FORMAT").Range("AO7").Value
    End Sub

  6. #6
    Forum Contributor
    Join Date
    07-10-2008
    Location
    UK
    Posts
    220
    THANKS... ur a legend !

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1