Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all I had asked this before but I dont think I was very clear so I will
try to explain this better. I have a userform where I have a combobox1 which it rowsource is ranges a1:c:1000 I also have 2 textbox's textbox1 and textbox2 I want to have a macro look up the value of combobox1 and then compare it with sheet "reg". Once it has found the item I want the value of textbox1 to automatically add on to the value in that cell which is in column "e" and the same with textbox2 with column"f". Bob tried to help with this code below but it does not seem to work. Set rng = Worksheets("Sheet1").Range("A1:A10") On Error Resume Next iPos = Application.Vlookup(Listbox1.Value) On Error GoTo 0 If iPos 0 Then Worksheets("Sheet1").Cells(iPos, "E").Value = _ Worksheets("Sheet1").Cells(iPos, "E").Value TextBox1.Text Worksheets("Sheet1").Cells(iPos, "F").Value = _ Worksheets("Sheet1").Cells(iPos, "F").Value Textbox2.Text End If Thanks Greg |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Parameter question on query in Excel (Repost) | Excel Discussion (Misc queries) | |||
Repost of VBA Code/Lookup question | Excel Worksheet Functions | |||
Question - Repost | Excel Programming | |||
Data Validation Boxes and Ealier Versions of Excel | Excel Programming | |||
Excel 2000 math question, repost | Excel Programming |