VBA Question

Gary_E

Board Regular
Joined
Feb 18, 2002
Messages
108
General question

Does anyone know the difference between using Address vs. AddressLocal ? They both seem to generate the same results

Sample code*******************
aaa = ActiveCell.Address
bbb = ActiveCell.AddressLocal
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
From Help:<pre>
AddressLocal Property
Returns the range reference for the specified range in the language of the user. Read-only String.

Example
Assume that this example was created using U.S. English language support and was then run in using German language support.
The example displays the text shown in the comments.

Set mc = Worksheets(1).Cells(1, 1)
MsgBox mc.AddressLocal() ' $A$1
MsgBox mc.AddressLocal(RowAbsolute:=False) ' $A1
MsgBox mc.AddressLocal(ReferenceStyle:=xlR1C1) ' Z1S1
MsgBox mc.AddressLocal(ReferenceStyle:=xlR1C1, _
RowAbsolute:=False, _
ColumnAbsolute:=False, _
RelativeTo:=Worksheets(1).Cells(3, 3)) ' Z(-2)S(-2)

-----------------
Address Property
Returns the range reference in the language of the macro. Read-only String

Example
Example
The following example displays four different representations of the same cell address on Sheet1.
The comments in the example are the addresses that will be displayed in the message boxes.

Set mc = Worksheets("Sheet1").Cells(1, 1)
MsgBox mc.Address() ' $A$1
MsgBox mc.Address(RowAbsolute:=False) ' $A1
MsgBox mc.Address(ReferenceStyle:=xlR1C1) ' R1C1
MsgBox mc.Address(ReferenceStyle:=xlR1C1, _
RowAbsolute:=False, _
ColumnAbsolute:=False, _
RelativeTo:=Worksheets(1).Cells(3, 3)) ' R[-2]C[-2]</pre>

_________________
Regards,

Juan Pablo G.
MrExcel.com Consulting
This message was edited by Juan Pablo G. on 2002-02-21 20:07
 
Upvote 0
Local appears to be based on your language settings. The other is based on universal settings (as decided in Seattle, Wa).

Cheers,
Nate
This message was edited by NateO on 2002-02-21 20:22
 
Upvote 0
Too techie?

Bottom line =

Stay away from the local.

Cheers,
Nate
This message was edited by NateO on 2002-02-21 21:14
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,236
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top