Hi All,
Is there a way to have a shape or button on excel sheet to move up/down when scrolling up/down in excel?
Thanks,
Hi All,
Is there a way to have a shape or button on excel sheet to move up/down when scrolling up/down in excel?
Thanks,
In the way I think you're asking then no.
However I have used both Freeze Panes and Window split in the past to maintain a shape in an area while the user scrolls/moves around the rest of the file.
Please do add reputation where you see fit, it's nice to be nice and we all enjoy a pat on the back
Please also mark your thread as solved once it has been.
Thanks for your reply. Yes I meant to have one of those 'to the top of the page' buttoms you see in some websites.
There's no VBA scroll event that you could use
You could use a Sheet Selection change that moved the shape to the selected cell i.e.
But of course this will move the shape whenever you select a cell so you'd probably want to add some condition to prevent it happening all the time.Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.Shapes("myshape").Cut Target.PasteSpecial (xlPasteAll) Selection.Name = "myshape" Target.Select End Sub
But is it necessary to jump through these hoops. Can't you Freeze pains or even Split the window(s).
What does the button actually do. If it runs a macro then consider adding a shortcut key to the macro and hit the shortcut keys when you need it to move.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks