Deprecated [...]

  • Thread starter Thread starter Bruno Campanini
  • Start date Start date
B

Bruno Campanini

What's about MS "deprecated" notation [Sheet2!B5]?
I'm using that notation as it is much simpler to write
than Worksheets("Sheet2").Range("B5").

Am I alone? any opinions?

Bruno

PS
Well, I know I can't use [Sheet2!B5](2),
[MyRangeVar], etc.
 
Not sure of your question
This worked in XL2007 as well as XL2003

Sub tryme()
Range("J5") = [Sheet3!A1]
End Sub

best wishes
 
Not sure of your question
This worked in XL2007 as well as XL2003

Sub tryme()
Range("J5") = [Sheet3!A1]
End Sub

No.
I said I'm using [Sheet3!A1] instead of
Worksheets("Sheet1").Range("A1")

Then:

Set MyRange = [Sheet3!A1]
instead of
Set MyRange = Worksheets("Sheet1").Range("A1")
and so on.

I know MS states [Sheet3!A1] is "deprecated"
compared with Worksheets("Sheet1").Range("A1").
I'wondering how many people act this way and what
pros and contras.

Bruno
 
Sorry I am confused
Sheet3 is the same as "Sheet1" ???

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


Bruno Campanini said:
Not sure of your question
This worked in XL2007 as well as XL2003

Sub tryme()
Range("J5") = [Sheet3!A1]
End Sub

No.
I said I'm using [Sheet3!A1] instead of
Worksheets("Sheet1").Range("A1")

Then:

Set MyRange = [Sheet3!A1]
instead of
Set MyRange = Worksheets("Sheet1").Range("A1")
and so on.

I know MS states [Sheet3!A1] is "deprecated"
compared with Worksheets("Sheet1").Range("A1").
I'wondering how many people act this way and what
pros and contras.

Bruno
 
I have not heard anywhere that the [] notation is deprecated.

Its shorthand for the Application.Evaluate method.

Advantages are that its shorter.

Disadvantages are
- you cant use a string so the reference is hard-coded into your code
- its slower
- its Application.Evaluate rather than Worksheet.Evaluate
- ...

I mostly only use Evaluate with Defined Names

Charles
___________________________________
The Excel Calculation Site
http://www.decisionmodels.com
 
Back
Top