View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Dim cht as Object Constant Declaration

If you declare a variable as an object (including range or worksheet or workbook
or...), then you have to use the Set command:

Set cht = ....

R Tanner wrote:

I have the simplest question ever. Why can I not declare this
variable? I think if you can give me a good answer you will solve my
confusion on declaring constants..

Dim cht As Object

cht = Sheets("Cheet4").ChartObjects("Chart 5").Chart

Thanks and sorry I post so many questions...


--

Dave Peterson