Link to home
Start Free TrialLog in
Avatar of Sara Hedtler
Sara Hedtler

asked on

How to transfer values from one userform in excel to another

I have a workbook that i need to transfer values from one form to another, but I've seen so many different ways to do it and I really don't understand.
SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sara Hedtler
Sara Hedtler

ASKER

Thank you, i think i need to figure out how to assign an "ID#" to each active row.  If a row says "Bound", then it needs to be assigned to a cell or a userform on the next available row.  I'm still trying to iron it out.
If the Staus is Bound where is the ID to tored and would it be just a number?
Is this actually about userforms as your title says?
Useforms are used in VBA macro procedures and are independent of Worksheets.
I'm still working out the kinks in the attached.  But, anything that show's "Bound" needs to be listed on the "Check Request" page.  We will have several policies for one client being bound at the same time, but I'm not able to figure out how to do it.  The same goes on the endorsement to transfer to the policy userform once it's completed.  So for instance, if i have an endorsement to process, but i need to get the pro rated amount first, i need to complete the endorsement form linked to the policy input form, and then when i hit transfer, the endorsement premium will go to the pure premium box and then to the endorsement summary page potentially.  experts-exchange---policy-form-code.xlsm
Have a look at my DatabaseForm here. Let me know whether we can adapt it for this form. In the meantime I'll have a look what I can do with what you have posted.

It's good to see you using some of the code I introduced you to in the last form
I've had a quick look. This code needs a slight amendment. When referring to the userform that contins the code, use Me, see below.
Private Sub Done_btn_Click()

    Range("d10").Value = BusinessName_txtbox
    Range("d11").Value = BusinessAddress_txtbox
    Range("d12").Value = CityStateZip_txtbox
    Range("d13").Value = Feintxtbox
    Range("d15").Value = Agency_cbox
    Range("d17").Value = Producer_cbox
    Range("d19").Value = Statuscbox
    Range("d21").Value = CSRAssigned_cbox

    '    Main_Form.Hide
    Me.Hide

    PolicyInputForm1.Show

End Sub

Open in new window


What do you want populating to the next form
There wasn't any database form on your post?  Did it go over my head?
SAorry I forgot to add the link.

I'm not sure what daat needs sending to the other form. I would normally do something like this


Private Sub Done_btn_Click()

    Range("d10").Value = BusinessName_txtbox
    Range("d11").Value = BusinessAddress_txtbox
    Range("d12").Value = CityStateZip_txtbox
    Range("d13").Value = Feintxtbox
    Range("d15").Value = Agency_cbox
    Range("d17").Value = Producer_cbox
    Range("d19").Value = Statuscbox
    Range("d21").Value = CSRAssigned_cbox

    '    Main_Form.Hide
    Me.Hide
   With PolicyInputForm1
   .cboStatus.ListIndex = Me.Statuscbox.ListIndex
   .txtComp.Value = Me.BusinessName_txtbox.Value
   .Show
End With

Open in new window


However, the staus comboboxes don't have the same lists.

Also, you really need to use similar naming onventions for the controls.

I'll check back later after work.
From the Policy form, if we are processing an endorsement; from the combobox "End", we need to be able to click on that, plug in some dates and figures, and then when hit transfer, the data from that populated endform1 needs to only transfer the change date to the effective date in the policy form and the endorsement premium transfer to the pure premium.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The text box did exactly what I was hoping for, by populating the endorsement form up.  I used the code you did for the date transfer and applied it to the remaining boxes and it worked BEAUTIFULLY! THANK YOU AGAIN SO MUCH!
Pleased to help
AMAZING, 1MILLION THANKS!