Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run-time error 424

I am very new to VB and I'm sure there must be an easier
way to do what I want. I am trying to take a value from a
text box on a form and move it to a cell in my worksheet.
The location of the cell is determined by a VLOOKUP
function. When I run the following code I get a run-time
error 424: Object Required. The error occurs on the last
ine. Any ideas on what may be missing? Thanks for any help.

Set CurrentDealer = Worksheets("All Dealers
Data").Range("A74:a74")
Set DealerData = Worksheets("All Dealers Data").Range
("A2:aa72")

Application.WorksheetFunction.VLookup(CurrentDeale r,
DealerData, 24, False) = txtAltGoal.Value

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default Run-time error 424

If the expression

Application.WorksheetFunction.VLookup(CurrentDeale r, _
DealerData, 24, False) = txtAltGoal.Value

returns a cell address like A1 then you need to change it to

Range(Application.WorksheetFunction.VLookup(Curren tDealer, _
DealerData, 24, False)) = txtAltGoal.Value

HTH,
Shockley


"Dale" wrote in message
...
I am very new to VB and I'm sure there must be an easier
way to do what I want. I am trying to take a value from a
text box on a form and move it to a cell in my worksheet.
The location of the cell is determined by a VLOOKUP
function. When I run the following code I get a run-time
error 424: Object Required. The error occurs on the last
ine. Any ideas on what may be missing? Thanks for any help.

Set CurrentDealer = Worksheets("All Dealers
Data").Range("A74:a74")
Set DealerData = Worksheets("All Dealers Data").Range
("A2:aa72")

Application.WorksheetFunction.VLookup(CurrentDeale r,
DealerData, 24, False) = txtAltGoal.Value



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
Visual Basic Error Run Time Error, Type Mismatch Meg Partridge Excel Discussion (Misc queries) 12 September 10th 08 06:10 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Receiving run-time error only part of the time [email protected] Excel Discussion (Misc queries) 0 August 11th 07 12:01 AM
run-time error '91'-Close Button error ASCO IS Help Excel Discussion (Misc queries) 1 May 8th 06 04:25 PM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM


All times are GMT +1. The time now is 02:25 AM.

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

About Us

"It's about Microsoft Excel"