Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Set Value from Vlookup


I'm getting an object required error. I'm not sure what I'm doing wrong.
(newbie)

I want to change the value in my database based on what I type in my
forms text box. Any ideas?

Here is my code:

Private Sub CommandButtonPriceButtonPrevious_Click()
Set pb = Worksheets("PriceBook").Range("PriceBookDatabase")
pbra = Application.VLookup(Label1stICLabel.Caption, pb, 2, False)
pbwa = Application.VLookup(Label1stICLabel.Caption, pb, 3, False)
pbrb = Application.VLookup(Label1stICLabel.Caption, pb, 4, False)
pbwb = Application.VLookup(Label1stICLabel.Caption, pb, 5, False)
pbrc = Application.VLookup(Label1stICLabel.Caption, pb, 6, False)
pbwc = Application.VLookup(Label1stICLabel.Caption, pb, 7, False)
pbrx = Application.VLookup(Label1stICLabel.Caption, pb, 8, False)
pbwx = Application.VLookup(Label1stICLabel.Caption, pb, 9, False)
pbra.Value = Me.TextBoxGradeA_RetailValue.Value
pbwa.Value = Me.TextBoxGradeA_WholesaleValue.Value
pbrb.Value = Me.TextBoxGradeB_RetailValue.Value
pbwb.Value = Me.TextBoxGradeB_WholesaleValue.Value
pbrc.Value = Me.TextBoxGradeC_RetailValue.Value
pbwc.Value = Me.TextBoxGradeC_WholesaleValue.Value
pbrx.Value = Me.TextBoxGradeX_RetailValue.Value
pbwx.Value = Me.TextBoxGradeX_WholesaleValue.Value
MultiPage2.Value = 13
End Sub


--
ssjody
------------------------------------------------------------------------
ssjody's Profile: http://www.excelforum.com/member.php...o&userid=33398
View this thread: http://www.excelforum.com/showthread...hreadid=555205

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If (Vlookup 0) working, but what if Vlookup cell does not exist Steve Excel Worksheet Functions 18 November 18th 09 07:33 PM
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 04:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"