Jump to content
xisto Community
Sign in to follow this  

Excel Vb Form

Recommended Posts

I want to populate form values with data if the data chosen in a drop down menu matches with data that is already entered in to the excel sheet. The rest of the values are just textboxes. I was thinking if I could just force the value of the textbox to the data already entered in the sheet, but the form values are not changing. Please help!Code:Private Sub wellname_Change()num = Sheet2.Cells(1, 1) - 1For Count = 1 To num Step 1 If wellname.Value = Sheet1.Cells(count, 1) Then UserForm1.point1.Value = Sheet1.Cells(Count, 2) UserForm1.point2.Value = Sheet1.Cells(Count, 3) UserForm1.point3.Value = Sheet1.Cells(Count, 4) UserForm1.point4.Value = Sheet1.Cells(Count, 5) UserForm1.point5.Value = Sheet1.Cells(Count, 6) UserForm1.point6.Value = Sheet1.Cells(Count, 7) UserForm1.point7.Value = Sheet1.Cells(Count, 8) UserForm1.point8.Value = Sheet1.Cells(Count, 9) End IfNext Count End Sub

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.