+ Reply to Thread
Results 1 to 7 of 7

Userform textbox to reference active cell with offset

  1. #1
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Userform textbox to reference active cell with offset

    What is wrong with this code:
    Please Login or Register  to view this content.
    I am trying to get a text box in a userform to display the data with the active cell offset, but it keeps coming up blank.

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Userform textbox to reference active cell with offset

    If it's not on the first row, would it work with:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Userform textbox to reference active cell with offset

    That doesn't seems to work either. See attached sample workbook.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Userform textbox to reference active cell with offset

    Is this what you are looking for? What do you want to do if the active cell is on row 1?
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Userform textbox to reference active cell with offset

    Thank you, that sample workbook works just as I need it to. However I'm having difficulty transferring it into my current workbook. I have copied the same code over but it just returns blank, and I can't figure out why.
    Do you mind taking a look at my current workbook.
    If you go to the ReturnData page then click on the Start Scan button at the top (taking you to the next empty row in G). Enter the serial 123. Since this doesn't return data for F it will open the NewItem user form. I would like the Serial Number text box on this form to display the serial number just entered (which should be 3 cells to the right of the current active cell, since the active cell gets moved to D when todays date is automatically entered).
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Userform textbox to reference active cell with offset

    If you put in the values 123, then press enter, this does the job for me:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    09-16-2013
    Location
    Los Angeles, USA
    MS-Off Ver
    Excel 2011
    Posts
    620

    Re: Userform textbox to reference active cell with offset

    That worked for me the first time, but then it keeps bringing up the same serial number and item description I first entered every consecutive time the user form opens. Its as if its remembering the first entry, and not clearing it when the user form is reopened. If I close and reopen the workbook it resets it.

+ 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] Userform to add data to active cell offset
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 12-14-2013, 07:58 PM
  2. Use Userform Textbox to find worksheet cell value and offset.
    By snuggie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 11:58 AM
  3. Running a different Active.Cell Offset.....
    By Kirtman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 05:52 AM
  4. Reference a userform numbered textbox in vba
    By Khaos176 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-26-2009, 10:04 AM
  5. [SOLVED] pasting textbox value to active cell
    By ASU in forum Excel General
    Replies: 2
    Last Post: 06-23-2006, 11:10 AM

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