its part of the template for a couple of reasons
- There is lots of VBA involved....including a timer to handle the increments
- All shapes use cells in the page to pace their progress
The dashboard controls all this (single step forward, single step back...actual animation....reset to beginning)
The bullseye allows somebody to add animation to any existing shape
- basically add the existing shape to the given bullseye....shape will move with bullseye
- Bullseye approach allows you to add steps in the middle if you want (or take steps away)...right click the bullseye
- Several types of movement defined
- Each bullseye shape uses the scratch section to track location for each step in the animation (figured it was better there than to create some sort of ad hoc DB to track all shapes in play)
(a DB approach - VBA DIM of a multiple dimension array - is probably more sophisticated, but the debug is much tougher...would need to use the msg box alot to make sure tracks as you want)
So with multiple bullseyes on a page....can get several shapes to move.
This is not intended to use layering per se (bullseye current on the same layer as the shapes...never really messed with shapes on different layers...feel free to add that).
Frankly, if you are really interested in this...here is what I would do coming into this new
- Open up the VBA
- Look at the first few subs
- how to get full screen
- timer behavior
- single step forward/back
- Once you think you got that understood, the rest of the subs address specific behaviors
- adding / deleting steps
- finding all the shapes on the page that animate and moving them appropriately
- Arcs vs straight line movement
- etc
- Once you have that...then can think about better ways to to go
- Maybe a VBA DB to track steps (if you do use this approach...lots to consider)
- how to extend or shrink....aka assume you started with 10 steps...but now want 11 or 9...how does the DB realign...what gets dropped
- Would either need to define up front the size of array (or just make a huge one of 100 steps at compile time)....or...thus a variable DIM construct.
- Number of shapes grows or shrinks (maybe 20 and invalidate if shape dissappears)
- Index for shape into array
- So assuming brute force....20 by 1 for name/index and 20 by 100 for steps...if you want to brute force this.
- explore layering (might be a nice way to hide/show animation "bullseyes" vs what I did.
- The current stuff looks at path animation....but could look at shape behavior otherwise
- change color on step 5
- change text on step 6
- even hide / show shape at given step.
- Place the dashboard in the UI instead of on the sheet (note the visual progress indicator...probably want to keep that).
I think the key is going to be the following:
- Need to make the fullscreen UI as you want (dashboard or in UI)
- Need to make a general purpose step engine (the stepping is pretty simple...the approach to manage what shape does what at each step is the question)
- Need to define some sort of opcode structure so that for a given shape, the opcode defines what is to be done...that way, can extend later if need be
(for example, if 20 X 100 has each entry as a say 4 elements....op code + 3 pieces of info such as options, X location, Y location....then can add other opcodes as needed)
I still think you will want to keep this as a template....I think you probably could make a stencil approach work but there are subtleties.
There maybe enviroment issues on different peoples systems that might cause problems.
All that said, you could gauge the community here to see if a collaborative effort on this would be helpful (aka akin to like open source development)
There are alot of very talented people here...and many are much more fluent with VBA than I am (I'd be the first to say, if you look at my VBA, you can see a brute force approach to this).
Note, there was a french company about 3 years ago that did something similar....I did not look at it in detail since they wanted $$$ for the suite.
But maybe its worth looking at as well.