Mikevirgil
New Member
- Joined
- Mar 25, 2016
- Messages
- 2
I have 250 uniquely named shapes(dots) on a sheet named after cities. Most of my macros assigned to buttons perform two functions: hide/show individually listed dots and autofilters a range of data related to the dots.
I would like the dots to react (hide/show) based on the results of autofilter results of AY selected by the user. Thy sheet has lots of columns, by AY holds unique values I can use to tie back to the shapes.
The range "ay40:ay2000" is named "CustomDotList", but I really don't want all the rows, just the visible ones.
All shapes/dots will start off hidden
.visible = msoFalse
Then the autofilter will be executed by the user.
Since the autofilter will then have several hidden rows, I only want to wildcard-search ("*Denver*") in the visible cells of AY, and IF I find a 'match' THEN make
shape.("Denver").visable = msoTrue
Then go onto the next one by maybe using ELSE ?
Wildcard-search ("*Fargo*") in the visible cells of AY, and IF I find a 'match' THEN make shape.("Fargo").visable = msoTrue
And so on, and so on, through all 250 dot name options. Then 'end sub'
It's almost like I need a dictionary or array of the visible rows of column AY built, then run listed/looped instring wildcards against the dic/array and have shapes change based on 'finds/matches'
I'm very new to VB and have not been able to write it on my own, nor have I been able to find anything online.
Thank you in advance for any help that can be offered.
I would like the dots to react (hide/show) based on the results of autofilter results of AY selected by the user. Thy sheet has lots of columns, by AY holds unique values I can use to tie back to the shapes.
The range "ay40:ay2000" is named "CustomDotList", but I really don't want all the rows, just the visible ones.
All shapes/dots will start off hidden
.visible = msoFalse
Then the autofilter will be executed by the user.
Since the autofilter will then have several hidden rows, I only want to wildcard-search ("*Denver*") in the visible cells of AY, and IF I find a 'match' THEN make
shape.("Denver").visable = msoTrue
Then go onto the next one by maybe using ELSE ?
Wildcard-search ("*Fargo*") in the visible cells of AY, and IF I find a 'match' THEN make shape.("Fargo").visable = msoTrue
And so on, and so on, through all 250 dot name options. Then 'end sub'
It's almost like I need a dictionary or array of the visible rows of column AY built, then run listed/looped instring wildcards against the dic/array and have shapes change based on 'finds/matches'
I'm very new to VB and have not been able to write it on my own, nor have I been able to find anything online.
Thank you in advance for any help that can be offered.