Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Object required

Hi! I have a problem with a simple code piece. when trying to run the code
below I get the error: "Object required". Please help me solve this! Thank
you very much!

ratingCell = Range("c9")
pos = 1
i=1
ratingCell.Offset(pos, i) = "test"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,118
Default Object required

When assigning objects to object variables you must use the SET keyword.

Try this:

SET ratingCell = Range("c9")
pos = 1
i=1
ratingCell.Offset(pos, i) = "test"

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Arne Hegefors" wrote:

Hi! I have a problem with a simple code piece. when trying to run the code
below I get the error: "Object required". Please help me solve this! Thank
you very much!

ratingCell = Range("c9")
pos = 1
i=1
ratingCell.Offset(pos, i) = "test"

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
Object Required Patrick Simonds Excel Programming 5 August 5th 06 08:08 AM
Object Required Jim Thomlinson Excel Programming 0 March 26th 06 11:46 PM
Object Required aftamath Excel Discussion (Misc queries) 2 March 14th 06 10:19 PM
Object required. y Excel Programming 1 April 10th 04 10:50 AM


All times are GMT +1. The time now is 09:54 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"