VBA Question
VBA Question
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: VBA Question

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Charlotte, NC USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    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
    Thxs for tips - this place is a great source for tips & tricks

    Gary

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    From Help:


    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]



    _________________
    Regards,

    Juan Pablo G.
    MrExcel.com Consulting

    [ This Message was edited by: Juan Pablo G. on 2002-02-21 20:07 ]

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Charlotte, NC USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thxs for the tips, but in plain language - Any difference between the 2 ?

    Thxs for tips - this place is a great source for tips & tricks

    Gary

  4. #4
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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 ]

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Charlotte, NC USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thxs Nate
    (I think)

  6. #6
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Too techie?

    Bottom line =

    Stay away from the local.

    Cheers,
    Nate

    [ This Message was edited by: NateO on 2002-02-21 21:14 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com