+ Reply to Thread
Results 1 to 4 of 4

causing macros to run at insertion point

  1. #1
    Inobugs
    Guest

    causing macros to run at insertion point

    When I create Excel macros that cause borders to be set or macros that
    include drawings, they only run where they were created. I need to have them
    run at the point the cursor is at when I execute the macro. In other words,
    they need to run other places in the worksheet, not just at the cells they
    were created. How can I do this?

  2. #2

    Re: causing macros to run at insertion point

    If you a recording a macro just click on the Relative Reference button
    on the Stop Recording toolbar.


  3. #3
    Inobugs
    Guest

    Re: causing macros to run at insertion point



    "[email protected]" wrote:

    > If you a recording a macro just click on the Relative Reference button
    > on the Stop Recording toolbar.
    >
    > Your suggestion works for borders and I should have remembered to do that from past use of macros. Thanks because that does help me. Drawing elements still revert to where they were drawn, can macros be created using drawing elements so they too are relative to the cursor cell? Thanks.

    Dan

  4. #4

    Re: causing macros to run at insertion point

    Something like this might work.

    Sub Macro3()

    iTop = ActiveCell.Top
    iLeft = ActiveCell.Left

    ActiveSheet.Shapes.AddShape msoShapeRectangle, iLeft, iTop, 219#,
    93#

    End Sub


+ 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