+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Valued Forum Contributor
    Join Date
    07-10-2008
    Location
    UK
    Posts
    219

    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/excel-programming/649878-count-blank-cells-within-a-range-not-including-fully-blank-rows.html

    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
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,445
    Which cell contains the value? You can simply use the UserForm_Initialize event to populate a TextBox

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

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  3. #3
    Valued Forum Contributor
    Join Date
    07-10-2008
    Location
    UK
    Posts
    219
    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
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,445
    You aren't using formulas in a userform. Do you mean a VBA userform?
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

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

  6. #6
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,445
    I think this is what you want

    Code:
    Private Sub UserForm_Initialize()
    Me.TextBox1.Value = Sheet("CORRECT FORMAT").Range("AO7").Value
    End Sub
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  7. #7
    Valued Forum Contributor
    Join Date
    07-10-2008
    Location
    UK
    Posts
    219
    THANKS... ur a legend !

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.2.0