Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inobugs
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Inobugs
 
Posts: n/a
Default causing macros to run at insertion point



" 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Point Assessment Calc? jolver Excel Discussion (Misc queries) 0 January 14th 06 02:24 AM
Excel crashes while opening excel file imbeddied with macros ct2147 Excel Discussion (Misc queries) 0 December 30th 05 09:05 PM
Enabling macros Peter M Excel Discussion (Misc queries) 3 February 7th 05 10:57 PM
Transferring toolbars and macros to other computers Darrell Excel Discussion (Misc queries) 1 January 19th 05 12:21 AM
Import chart to Power Point and Macro problem Woody13 Excel Discussion (Misc queries) 1 December 8th 04 05:47 PM


All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"