+ Reply to Thread
Results 1 to 5 of 5

Populate UserForm Text Boxes with Data in Workbook Cells

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Populate UserForm Text Boxes with Data in Workbook Cells

    Hi,

    I hope this is a simple ask. Unfortunately, I haven't been able to find a solution that isn't too convoluted for me to understand (I'm new to VBA).

    I have the below code and would like for each textbox (there are 5: MRA_txtbx_v1/2/3/4/5) to be pre-populated w/ the values in certain cells (the same cells that the useform is changing, listed below). Currently, the Userform works, but the textboxes show as blank when run.

    Here's my current VBA:
    Please Login or Register  to view this content.
    Thank you!

  2. #2
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Populate UserForm Text Boxes with Data in Workbook Cells

    Can you not simply reverse the transfer?
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Populate UserForm Text Boxes with Data in Workbook Cells

    you shall read values from cells in
    Please Login or Register  to view this content.
    in form code
    Best Regards,

    Kaper

  4. #4
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Populate UserForm Text Boxes with Data in Workbook Cells

    Can't get it to work -- where would I input that?

    I'd like for the data to be loaded when the UserForm pops-up

    i tried the below -- the UserForm still loads blank fields:
    ('UserForm_ManualRevAdj' is the name of my UserForm)
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Populate UserForm Text Boxes with Data in Workbook Cells

    SOLVED!

    Nevermind -- realized my 'Private Sub UserForm_ManualRevAdj_Initialize()' needed to be 'Private Sub UserForm_Initialize()'
    (i.e. w/o the custom name)

    Thanks all!

+ 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. Replies: 5
    Last Post: 10-23-2016, 01:14 PM
  2. [SOLVED] userform auto populate text boxes once combo box has been selected
    By kanew7869 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-11-2016, 10:24 AM
  3. [SOLVED] Userform Have Text Boxes Auto Populate Based on Combobox Selection & overwrite existing da
    By Rajesh shishodia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2015, 02:06 AM
  4. [SOLVED] Userform Have Text Boxes Auto Populate Based on Combobox Selection
    By strother1990 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2015, 04:30 PM
  5. [SOLVED] Populate userform text boxes with dater from another sheet, dependant on list box selectio
    By MallorcaPete in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-17-2015, 07:01 AM
  6. [SOLVED] Copy cells from column to userform text boxes by selection
    By pjbassdc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-29-2014, 08:40 PM
  7. [SOLVED] Populate cell values into 6 named text boxes in a userform then edit if required
    By How How in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-05-2013, 05:51 AM

Tags for this Thread

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