+ Reply to Thread
Results 1 to 5 of 5

Dynamic updating of current userform values based on userform data input or commandbutton

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Cary
    MS-Off Ver
    Excel 2003
    Posts
    18

    Dynamic updating of current userform values based on userform data input or commandbutton

    Hello again ExcelForum,

    I am working on an excel based chemical inventory and am hoping I can eliminate some user input by making a "dynamic" change. Is it possible to first have excel search column D (my catalogue number column) during data entry in a userform textbox called CatNumber (or on click of a commandbutton called AutofillCatalogue) and then copy the found row's data from columns E through K to the userform textboxes, comboboxes, checkboxes and optionbuttons?

    The following level of detail may be more than you need to help me get past the heavy lifting of this code:

    Column E is updated by NameBox.Value
    Column F is updated by CasBox.Value
    Column G is updated by VendorCombo.Value
    Column H is updated by GradeBox.Value
    Column I is updated by SizeBox.Value
    Column J is updated by the frame "ContainerType" optionbuttons CT1, CT2, CT3 and CT4 (is it possible to have Excel select the respective option button based on the found contents?)
    Column K is updated by the frame "Hazard" checkboxes Haz1, Haz2 .... Haz6 (again, is it possible to select the respective checkboxes based on the found contents?)

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Dynamic updating of current userform values based on userform data input or commandbut

    Yes it could be possible, but you don't give many details of the ranges/worksheets involved.

    Also, that summary at the bottom seems to be for the other way round ie form to worksheet.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    Cary
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Dynamic updating of current userform values based on userform data input or commandbut

    Thanks Norie.

    The worksheet is Sheet1 (Chemical Inventory). The involved named range "Database" refers to 'Chemical Inventory'!$A:$M.

    You are right about the bottom section. The function we are trying to build is the opposite of what I provided above. I was thinking of how it functions during data submission and not during "dynamic" data updating.

    The correct order would then be the following?

    NameBox.Value is updated by Column E
    ...
    The frame "ContainerType" optionbuttons CT1, CT2, CT3 and CT4 (is it possible to have Excel select the respective option button based on the found contents?) is updated by Column J.
    The frame "Hazard" checkboxes Haz1, Haz2 .... Haz6 (again, is it possible to select the respective checkboxes based on the found contents?) is updated by Column K.

    I appreciate you trying to understand this with the data I provided.

  4. #4
    Registered User
    Join Date
    10-15-2012
    Location
    Cary
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Dynamic updating of current userform values based on userform data input or commandbut

    Was that sufficient or do you need the file?

  5. #5
    Registered User
    Join Date
    10-15-2012
    Location
    Cary
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Dynamic updating of current userform values based on userform data input or commandbut

    Ok. Here's what I came up with. It's messy and needs some pro polish:
    Please Login or Register  to view this content.
    I really don't like the columns("D").select then Cells(1,1).Select part, but that was the only way I could get column D to be isolated for the update.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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