+ Reply to Thread
Results 1 to 4 of 4

macros - please explain relative references

  1. #1
    Registered User
    Join Date
    12-19-2023
    Location
    USA
    MS-Off Ver
    2014
    Posts
    1

    macros - please explain relative references

    can someone explain for me the use of Relative References?

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,006

    Re: macros

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to consider amending your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Guideline #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    I have done it for you this time.
    Last edited by AliGW; 12-19-2023 at 01:52 PM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: macros - please explain relative references


    Two samples self explaining :

    #1 : MsgBox Range("B3").Address

    #2 : MsgBox [C11].Range("B3").Address

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: macros - please explain relative references


    Another sample within this post : the first With codeline is an absolute reference, all references under are relative …

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sort Operation Works when Macros are called manually, but not when VBA calls the Macros
    By lovecolorado in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-18-2019, 02:13 PM
  2. Multiple macros for several files that change weekly - where to store macros
    By janljan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-21-2018, 10:54 PM
  3. Replies: 2
    Last Post: 04-13-2017, 02:57 AM
  4. Cant hide worksheets after macros to force users to enable macros
    By Mboemoyo85 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2015, 02:52 AM
  5. Replies: 0
    Last Post: 06-09-2015, 09:30 PM
  6. Replies: 5
    Last Post: 07-26-2012, 09:38 PM
  7. Macros: Data cleaning macros not producing expected outputes.
    By bertlogdi1 in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 06-17-2011, 06:52 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1