View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
recrit recrit is offline
external usenet poster
 
Posts: 20
Default Not at all clear on use of variables and/or object variables

On Jul 4, 10:19*am, JMay-Rke
wrote:
I jumped on the Excel (VBA) bandwagon some years ago. I have
dozens of books and reference them constantly. *In no book or
in my visiting any newsgroup have I been able to clearly make
the distinction between when to engage a regular variable versus
an object variable - particularly as regards the Range object.

Can someone make an attempt to CONTRAST these two elements?


do you mean when to use either of the following?

dim x
x = Range("A1")

|OR|

dim rng as Range
set rng = Range("A1")