+ Reply to Thread
Results 1 to 15 of 15

Make "group" of shapes static while scrolling?

  1. #1
    Forum Contributor
    Join Date
    07-19-2019
    Location
    Illinois, USA
    MS-Off Ver
    365
    Posts
    164

    Make "group" of shapes static while scrolling?

    I have a group of shapes that I have created into a "navigation" payne... I'd like to keep it in a particular spot on the screen even when you scroll down

    I found an example from google searching for accomplishing this with a graph... But I could not figure how to do it for a group

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Make "group" of shapes static while scrolling?

    Quote Originally Posted by PrimePorkchop View Post
    I have a group of shapes that I have created into a "navigation" payne
    what do you mean by that? can you post a screenshot of this "group" you speak of? shapes are part of one of the many object collections in excel. in general, a lot of that stuff slides with the grid when new matrix elements are injected into a sheet (e.g. - rows, cols). the one thing that comes to mind here is freezing the frame where the group is located, but I doubt that will work. I don't think freeze frames gives an option to freeze any given area. but it's been a while since I've done it.

  3. #3
    Forum Contributor
    Join Date
    07-19-2019
    Location
    Illinois, USA
    MS-Off Ver
    365
    Posts
    164

    Re: Make "group" of shapes static while scrolling?

    It's a bunch of rectangle shapes "Grouped" into something called "Group 8" (auto-named by Excel)
    Last edited by PrimePorkchop; 09-30-2020 at 02:01 AM.

  4. #4
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Make "group" of shapes static while scrolling?

    I tested all of this, and it seems to work fairly well. although it might not be perfect. this is about all I have to offer you, although I'm sure there is another solution out there somewhere:

    https://www.google.com/search?q=excel+group+of+shapes

    https://www.google.com/search?q=exce...hile+scrolling

    https://www.google.com/search?q=exce...up+keep+static

    SOLUTION FOUND:
    https://www.mrexcel.com/board/thread...lling.1053202/

  5. #5
    Forum Contributor
    Join Date
    07-19-2019
    Location
    Illinois, USA
    MS-Off Ver
    365
    Posts
    164

    Re: Make "group" of shapes static while scrolling?

    I forgot to mention, any solution with "Freeze Frames" default through excel simply won't work for my worksheet setup. I'm starting to think this might only be doable with VBA?

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Make "group" of shapes static while scrolling?

    well no doubt you probably can, but guess is that you don't want a ""freeze frames"" solution, it might take quite a bit of research to figure out. I think I've assisted all I can here. but I wish you luck with it.

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Make "group" of shapes static while scrolling?

    Hi there,

    As the attached link to a Chip Pearson web page shows, detecting scrolling (via scrollbars or mouse wheel) in a worksheet window is definitely NOT for the faint-hearted!



    A very much second-best approach enables you to detect a "scroll" caused by the PgUp or PgDn keyboard keys. Using this approach you can position a shape (which may be a group of shapes) at a specific location within the active window.

    The following code is inserted in the VBA CodeModule of the worksheet which contains the shape to be moved. The code positions the shape relative to the top-left cell of the active window, and may be offset from this position as required:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    07-19-2019
    Location
    Illinois, USA
    MS-Off Ver
    365
    Posts
    164

    Re: Make "group" of shapes static while scrolling?

    Greg - this works almost perfectly - in order to get the "Group" to snap back into place, relative to the position on the screen, I have to "click" in another cell... simply scrolling alone does not keep the "Group" in position.

    I wonder if there's a way to tell excel to do this when scrolling happens, instead of clicking?

  9. #9
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Make "group" of shapes static while scrolling?

    Hi again,

    Thanks for your feedback. I did say that my approach was very much "second best".

    The best way to respond to:


    I wonder if there's a way to tell excel to do this when scrolling happens, instead of clicking?

    is to quote from the web page I mentioned in my previous post,



    Using a technique called "subclassing", you can detect when the user scrolls in a worksheet window. Subclassing is a complicated topic, and will be described here only in the most general, oversimplified, terms.

    When Chip Pearson describes something as "complicated" you can be sure of one thing - it is DEFINITELY complicated!

    I took a quick look at what would be involved and came to the conclusion that I would attempt it only if I really needed it for my own purposes - so far, I don't need it. Sorry


    Regards,

    Greg M

  10. #10
    Forum Contributor
    Join Date
    08-26-2016
    Location
    UK
    MS-Off Ver
    O365
    Posts
    260

    Re: Make "group" of shapes static while scrolling?

    Consider putting the buttons on a modeless userform.
    In the attached is such a userform.
    If it doesn't appear then switch to Sheet1 from another sheet.
    I've not bothered positioning it etc., but it remains where you leave it and allows you to edit the sheet normally while it's still showing. Yes you can prevent the user from closing it and you can cause it to disappear when you switch to another sheet.
    Attached Files Attached Files
    Last edited by p45cal; 09-30-2020 at 07:45 AM.

  11. #11
    Forum Contributor
    Join Date
    07-19-2019
    Location
    Illinois, USA
    MS-Off Ver
    365
    Posts
    164
    Quote Originally Posted by Greg M View Post
    Hi again,

    Thanks for your feedback. I did say that my approach was very much "second best".

    The best way to respond to:

    is to quote from the web page I mentioned in my previous post,




    When Chip Pearson describes something as "complicated" you can be sure of one thing - it is DEFINITELY complicated!

    I took a quick look at what would be involved and came to the conclusion that I would attempt it only if I really needed it for my own purposes - so far, I don't need it. Sorry


    Regards,

    Greg M
    I completely overlooked that part of the site Greg, my apologies! Thank you for all the time you spent trying to help out, I surely do appreciate it!!

  12. #12
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Make "group" of shapes static while scrolling?

    Hi again,

    Many thanks for that further feedback.

    Sorry I wasn't able to help more.

    Regards,

    Greg M

  13. #13
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Make "group" of shapes static while scrolling?

    Hi p45cal,

    That seems like a really neat approach which never even occurred to me.

    It just goes to show that there's always more than one way to skin a cat when you're using Excel!

    Regards,

    Greg M

  14. #14
    Forum Contributor
    Join Date
    07-19-2019
    Location
    Illinois, USA
    MS-Off Ver
    365
    Posts
    164

    Re: Make "group" of shapes static while scrolling?

    Quote Originally Posted by p45cal View Post
    Consider putting the buttons on a modeless userform.
    In the attached is such a userform.
    If it doesn't appear then switch to Sheet1 from another sheet.
    I've not bothered positioning it etc., but it remains where you leave it and allows you to edit the sheet normally while it's still showing. Yes you can prevent the user from closing it and you can cause it to disappear when you switch to another sheet.
    The userform doesn't have the ability to create the same style I wanted, but that's okay - I'd rather have the functionality over the aesthetics. This works brilliantly. Thank you!

  15. #15
    Forum Contributor
    Join Date
    08-26-2016
    Location
    UK
    MS-Off Ver
    O365
    Posts
    260

    Re: Make "group" of shapes static while scrolling?

    Quote Originally Posted by PrimePorkchop View Post
    The userform doesn't have the ability to create the same style I wanted
    There are many ways the userform's appearance can be changed (and it's controls).
    I noticed that you had a picture of your shapes, but that's gone - if you re-inState that pic I may be able to go some way to copying it.
    Eg. a pic can be put on a button, or even just as a picture by itself - you can even control what happens depending where within the button or picture the mouse button is clicked. With some jiggery-pokery you can also change the shape of the overall userform (circle, triangle, rhomboid).
    Here's a pic of a button with my own picture on it:
    Attachment 697719[IMG]697720[/IMG]
    Attached Images Attached Images
    Last edited by p45cal; 09-30-2020 at 04:20 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 05-02-2018, 08:03 AM
  2. Replies: 0
    Last Post: 08-01-2016, 04:47 AM
  3. Replies: 1
    Last Post: 08-10-2014, 01:22 PM
  4. Replies: 1
    Last Post: 01-15-2014, 08:53 AM
  5. Replies: 2
    Last Post: 07-11-2006, 03:40 PM
  6. If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ...
    By Maria J-son in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2006, 08:25 AM
  7. Replies: 0
    Last Post: 02-01-2006, 03:35 AM

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