Jul 26, 2008

Excel Vb Form

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > VB Programming

free web hosting

Excel Vb Form

kvarnerexpress
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) - 1
For 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 If
Next Count

End Sub

Reply

no9t9
you need to put .VALUE after everything.

example:
UserForm1.point1.Value = Sheet1.Cells(Count, 2).value

try that. I think that is your problem.

Reply

lava.alt
thats right ... you have to know to what are you making refence qhen you put "=", in this case to an atribute of a class, in this case a cell

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. how do i force a vb form to populate a cell - 13.64 hr back. (1)
  2. multi form value to one form in excel - 16.96 hr back. (1)
  3. get value form excel - 21.19 hr back. (1)
  4. vb code to link vb textbox data to excel worksheet - 22.74 hr back. (1)
  5. how to get the value from a vb textbox to a excel cell - 44.68 hr back. (1)
  6. value form on excel - 45.50 hr back. (1)
  7. vb excell - 51.41 hr back. (1)
  8. forms vb no excel - 52.39 hr back. (1)
  9. create forms in vb to get values in excel - 64.12 hr back. (1)
  10. how to put form on excel sheet - 66.51 hr back. (1)
  11. vb link with excel - 76.57 hr back. (1)
  12. populate form in excel - 82.09 hr back. (1)
  13. excel vb form - 66.65 hr back. (2)
  14. excel search form - 110.46 hr back. (1)
Similar Topics

Keywords : excel, vb, form

  1. Vlookup In Vba/excel
    Can't doooooo it :( (0)
  2. Ms Excel : Search A Sheet
    (4)
    Anybody out there good with VBA and Excel? I am trying to search a sheet in a workbook (Sheet1),
    find out how many times particular values exists (int 1 to 54), then create a new workbook with a
    list of the values checked for and how many times they appeared. Been googling this, but everything
    I have found just confused me more, never done much with Office before. Thanks in advance for any
    help!! By the way, I am using Excel 2003 if that matters.......

    1. Looking for excel, vb, form

Searching Video's for excel, vb, form
advertisement



Excel Vb Form



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE