#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Range error

Why does this return an error?

Dim Unknown As Range
Unknown = Range("K24")

oldjay
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Range error

Range is an object and so you need to use the Set Statement which assigns an
object reference to a variable or property. Refer help on Set statement....

Dim rngTemp As Range
Set rngTemp = Range("K24")
'will refer to the activesheet cell K24

--
Jacob


"oldjay" wrote:

Why does this return an error?

Dim Unknown As Range
Unknown = Range("K24")

oldjay

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default Range error

Thanks I never know where to look in help. I think Help is for experts not a
dummy like me

"Jacob Skaria" wrote:

Range is an object and so you need to use the Set Statement which assigns an
object reference to a variable or property. Refer help on Set statement....

Dim rngTemp As Range
Set rngTemp = Range("K24")
'will refer to the activesheet cell K24

--
Jacob


"oldjay" wrote:

Why does this return an error?

Dim Unknown As Range
Unknown = Range("K24")

oldjay

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
Subscript out of range error - save copy error bg18461[_16_] Excel Programming 2 June 13th 06 04:53 PM
Subscript out of range error - save copy error bg18461[_15_] Excel Programming 1 June 13th 06 04:36 PM
Range.Select error and screen maximizing error in Workbook_Open() Punsterr Excel Programming 3 May 10th 06 10:16 PM
Range.Select error and screen maximizing error in Workbook_Open() Punsterr Excel Programming 0 May 10th 06 07:56 PM
Type Mismatch error & subscript out of range error Jeff Wright[_2_] Excel Programming 3 May 14th 05 07:14 PM


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