ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autofilter based on user inputbox (https://www.excelbanter.com/excel-programming/444572-re-autofilter-based-user-inputbox.html)

Steve[_4_]

Autofilter based on user inputbox
 
Hey Garry,

I stepped through the code, and the issue is the Copy. When you select Copy while the data is in Autofilter, the hidden columns are not selected in the copy range.

I did a search on the newsgroup to look for code that can identify hidden columns prior to the code run, unhide them, and then rehide the same columns after code execution...couldn't find anything yet.

Anyway, thanks for your help!

Clif McIrvin[_3_]

Autofilter based on user inputbox
 
"Steve" wrote in message
...
Hey Garry,

I stepped through the code, and the issue is the Copy. When you
select Copy while the data is in Autofilter, the hidden columns are
not selected in the copy range.

I did a search on the newsgroup to look for code that can identify
hidden columns prior to the code run, unhide them, and then rehide the
same columns after code execution...couldn't find anything yet.

Anyway, thanks for your help!



If you use VBA to loop through a range, it sees all the cells - hidden
or not.

You could use VBA to record the current Autofilter conditions, turn off
the filter (which will unhide), do your copy, then re-apply the filter
before updating the display.

If you need sample code I can pull some out ... if memory serves
correctly I got my original code for recording the current autofilter
settings from the on-board help for filter and autofilter.

--
Clif McIrvin

(clare reads his mail with moe, nomail feeds the bit bucket :-)



GS[_2_]

Autofilter based on user inputbox
 
Steve formulated on Tuesday :
Hey Garry,

I stepped through the code, and the issue is the Copy. When you select Copy
while the data is in Autofilter, the hidden columns are not selected in the
copy range.

I did a search on the newsgroup to look for code that can identify hidden
columns prior to the code run, unhide them, and then rehide the same columns
after code execution...couldn't find anything yet.

Anyway, thanks for your help!


Steve,
I answered in your other thread. You are aware that however you
interact with this NG that you're creating new threads for the same
topic instead of replying to existing threads for that topic, right?
Makes it hard to follow...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




All times are GMT +1. The time now is 01:27 AM.

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