ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro linked to text or an object (https://www.excelbanter.com/excel-discussion-misc-queries/88620-macro-linked-text-object.html)

areaume

Macro linked to text or an object
 
I have a single page in Excel that is formattted to be a series of objects
(boxes) at the top of the page that will take you to selected text lower in
the page. I need a macro that will take me to the selected text and will
remain with that text even if additional rows are inserted above it.

I tried creating a object next to my text and linking the macro to it. The
object will move with the text but I cannot get the macro to "go to" the
object, it only moves to that cell. Once more data is inserted above it, the
macro take me to the original cell rather than moving with my text.

Thank-you for any help you can offer.

kassie

Macro linked to text or an object
 
Why not select the destination text, create a range name referring to the
selection, and then let your macro go to the range name instead. If rows get
added above, the range name remains the first line of text, therefore not
affecting you.

"areaume" wrote:

I have a single page in Excel that is formattted to be a series of objects
(boxes) at the top of the page that will take you to selected text lower in
the page. I need a macro that will take me to the selected text and will
remain with that text even if additional rows are inserted above it.

I tried creating a object next to my text and linking the macro to it. The
object will move with the text but I cannot get the macro to "go to" the
object, it only moves to that cell. Once more data is inserted above it, the
macro take me to the original cell rather than moving with my text.

Thank-you for any help you can offer.



All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com