+ Reply to Thread
Results 1 to 2 of 2

How do I turn on relative reference(?) in a macro (97ver had butto

  1. #1
    Bernina27
    Guest

    How do I turn on relative reference(?) in a macro (97ver had butto

    In the 97 version of Excel you could click the relative reference button (I
    think that is what it was called) and the macro would recognize and update
    itself automatically if the spreadsheet itself changed after the macro was
    created. (i.e. vb programming says select cell B2 and clear the contents, you
    insert a row above row B, so B2 is now B3 but your macro still wants to clear
    B2.)

    How do you do this in Excel 2003?
    Thanks.


  2. #2
    Jim Thomlinson
    Guest

    RE: How do I turn on relative reference(?) in a macro (97ver had butto

    There is no way to reference as you describe. The code will have no idea that
    at some point prior to exectution that the sheet was changed (row inserted).
    Right on the Macro record toolbar there is a button for relative referencing
    but that will not do what you have described here. The way to do that would
    be to make Cell B2 a named range. Then when you record the macro it will
    reference the named range which will move as you insert rows or such thereby
    keeping your macro working as intended.
    --
    HTH...

    Jim Thomlinson


    "Bernina27" wrote:

    > In the 97 version of Excel you could click the relative reference button (I
    > think that is what it was called) and the macro would recognize and update
    > itself automatically if the spreadsheet itself changed after the macro was
    > created. (i.e. vb programming says select cell B2 and clear the contents, you
    > insert a row above row B, so B2 is now B3 but your macro still wants to clear
    > B2.)
    >
    > How do you do this in Excel 2003?
    > Thanks.
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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