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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
Useforms are used in VBA macro procedures and are independent of Worksheets.
ASKER
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
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.
What do you want populating to the next form
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
What do you want populating to the next form
ASKER
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
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.
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
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.
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
ASKER
AMAZING, 1MILLION THANKS!
ASKER