In a user form I want to enter a value in a text box (txtItem) and have it return a value in another text boxs (txtProduct), (txtProC), and (txtOpt).
I have formulas in a work sheet that now displays the value from the vlookup.
this would be the txtItem;
=IF(B4="","",VLOOKUP(B4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$A:$D,2,FALSE))
This is how far I got before I got stumped trying to do it in VBA;
Set wb = Workbooks\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]")
Set ws = wb.Sheets("North")
Set rng = ws.Range("$A:$D")
ActiveCell.Value =
Application.WorksheetFunction.VLookup(ActiveCell.Offset(?,?).Value, rng,
2, False)
These are the other two vlookup formulas;
(txtProC)
=IF(B4="","",VLOOKUP(B4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$A:$D,4,FALSE))
(txtOpt)
=VLOOKUP(E4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$F:$I,4,FALSE)
Can any help me out here.
Thanks
I have formulas in a work sheet that now displays the value from the vlookup.
this would be the txtItem;
=IF(B4="","",VLOOKUP(B4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$A:$D,2,FALSE))
This is how far I got before I got stumped trying to do it in VBA;
Set wb = Workbooks\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]")
Set ws = wb.Sheets("North")
Set rng = ws.Range("$A:$D")
ActiveCell.Value =
Application.WorksheetFunction.VLookup(ActiveCell.Offset(?,?).Value, rng,
2, False)
These are the other two vlookup formulas;
(txtProC)
=IF(B4="","",VLOOKUP(B4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$A:$D,4,FALSE))
(txtOpt)
=VLOOKUP(E4,'\\Owensrv\owen\Management Projects\Plant Governance\[Rate Lookup Tool.xls]North'!$F:$I,4,FALSE)
Can any help me out here.
Thanks