View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Setting range value to a variable

Todd,

Get rid of the Set keyword. It is only used when assigning an
object to an object variable. Since you have declared desc as a
String, and you are using the Value property of the range, you
don't need and are not allowed to use Set.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Todd" wrote in message
...
Hi all,

I'm trying to set a range value to a variable with the
following code:

Dim desc As String
Set desc = Range("D9").Value

I keep getting an "Object Required" error and can't for
the life of me figure it out. Any suggestions?