Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Need help interpreting a code line


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 915
Default Need help interpreting a code line

Ayo wrote:
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


It is a shortcut for the Evaluate method.

[KML_Details!C2] == Evaluate("KML_Details!C2")

I'm not so smart though. I just ran across that syntax last night,
actually. See F1 on "Evaluate".
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Need help interpreting a code line

squaer braces is an "old fashioned" way of addressing cells and should be
avoided as much as possible.



"Ayo" wrote:


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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Interpreting Values mrsatroy Charts and Charting in Excel 2 May 27th 10 10:51 PM
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Code to read file in reverse fast line by line ChristopherL Excel Programming 3 October 1st 08 12:45 AM
Interpreting some code in C Laurence Lombard Excel Programming 0 September 25th 07 08:49 AM
help interpreting expression anny Excel Worksheet Functions 3 February 5th 06 06:38 PM


All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"