Target As Excel.Range or Target As Range

P

Piranha

Hi,
Is there any difference in these two statements??
What does the word "Excel." do??

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Private Sub Worksheet_Change(ByVal Target As Range)

Thx
Dave
 
J

Jim Thomlinson

99.9% of the time there will be absolutely no difference. Using the word
Excel more fully resolves the object. Range in this case is a part of the
Excel object. If you had referenced something else which had Range as a key
word then you would need this to specify what type of range you were refering
to.
 
P

Piranha

Jim,
Thank you very much for your explanation. It is very good.
Thx again
Dave

Jim said:
99.9% of the time there will be absolutely no difference. Using th
word
Excel more fully resolves the object. Range in this case is a part o
the
Excel object. If you had referenced something else which had Range as
key
word then you would need this to specify what type of range you wer
refering
to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top