+ Reply to Thread
Results 1 to 4 of 4

Fill textbox with the value of a cell

  1. #1
    Registered User
    Join Date
    07-25-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    2010
    Posts
    17

    Fill textbox with the value of a cell

    Hello.
    I have a code that have to fill a textbox with the value of last non empty cell from column F in active sheet.
    This code doesn't work, the textbox in frmInregistrare remain empty.
    The cause is because cells from column F isn't really empty, all cells have formulas.
    I think I know which is the wrong line but I don't know how it have to be modified.
    Could you help me, please?
    I've attached an example.
    Thanks.

    The code that I have is follow:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Fill textbox with the value of a cell

    The .Find method can return the last used cell value excluding null strings (i.e. "")

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,445

    Re: Fill textbox with the value of a cell

    Perhaps something like this??
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    07-25-2016
    Location
    Bucharest, Romania
    MS-Off Ver
    2010
    Posts
    17

    Re: Fill textbox with the value of a cell

    Both of codes work perfectly.
    Thank you @AlphaFrog and @MarvinP.

    The following code also works fine.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Create a text box for each row of data and fill that textbox with concatenated cell value.
    By Goldbadger in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-08-2015, 07:19 AM
  2. Fill a cell via textbox according to combobox selection
    By dj_danu01 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-15-2013, 08:12 AM
  3. [SOLVED] Fill a cell via textbox on userform depending on combobox selection
    By Rhamilton2512 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-15-2012, 10:29 AM
  4. Textbox fill and edit a cell
    By monttaup in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2012, 11:20 AM
  5. [SOLVED] VBA UserForm - Have entry in TextBox fill Another TextBox by VLOOKUP
    By msquared99 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2012, 10:24 PM
  6. Userform textbox to fill next blank cell in column
    By RaffertyL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2012, 03:20 AM
  7. Fill Textbox from cell
    By V. Roe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2005, 04:05 PM

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