+ Reply to Thread
Results 1 to 7 of 7

value of a cell into a text box

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-10-2008
    Location
    UK
    Posts
    220

    value of a cell into a text box

    before helping with this i suggest you take a look at my previous post http://www.excelforum.com/showthread.php?t=649878

    I need to display a cell value in a text box on a user form.

    This user form will have a button on it which takes the user to the 1st empty cell within a defined cell range (again not including the completley empty rows)

    any idea how to do these?

  2. #2
    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

  3. #3
    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

  4. #4
    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?

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

  6. #6
    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

+ 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