Need help interpreting a code line

  • Thread starter Thread starter Ayo
  • Start date Start date
A

Ayo

Set filepath = [KML_Details !C2]

I know KML_Details is the sheet name and C2 in the cell but I don't know
what the brackets [ ] are there for. Can someone explain to me why it is
written this way and not

Set filepath = Worksheet("KML_Details").Range("C2")

Any help will be greatly appreciated.
Thanks
 
squaer braces is an "old fashioned" way of addressing cells and should be
avoided as much as possible.
 
Back
Top