Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with userform?
I have a userform with a listbox and a couple of textbox's
I want to have a macro that will lookup the name in the listbox on a sheet called "reg" and have textbox1 add its amount to the amount in column e and textbox2 add its total to column f on the same row. Thanks Greg |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with userform?
Dim iPos as long
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 -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Greg B" wrote in message ... I have a userform with a listbox and a couple of textbox's I want to have a macro that will lookup the name in the listbox on a sheet called "reg" and have textbox1 add its amount to the amount in column e and textbox2 add its total to column f on the same row. Thanks Greg |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with userform?
Thanks for that will give it a go
Greg "Bob Phillips" wrote in message ... Dim iPos as long 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 -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Greg B" wrote in message ... I have a userform with a listbox and a couple of textbox's I want to have a macro that will lookup the name in the listbox on a sheet called "reg" and have textbox1 add its amount to the amount in column e and textbox2 add its total to column f on the same row. Thanks Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming | |||
Access from add_in userform to main template userform.... | Excel Programming | |||
Linking userform to userform in Excel 2003 | Excel Programming |