ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to insert row, copy cells and keep hidden columns (https://www.excelbanter.com/excel-programming/341158-macro-insert-row-copy-cells-keep-hidden-columns.html)

steven_thomas

macro to insert row, copy cells and keep hidden columns
 

I wrote a macro for users to insert a row below with some (not all)
copied cell formulas from above ... the user has to highlight any cell
in the row above where they want the insert and then press a button that
I have assiciated to the macro ... my macro works except when I have
hidden columns (which I do to keep the view simple) ...

I could add a section to pre unhide columns (and then rehide to keep
the view) but I will then lose my active cell pointer (I use this to
make sure I insert the row in the right place) ... any ideas ??? ... I
thought I could create a field to hold the activecell reference and
then go back to it once I unhide the columns but have been unable to
figure out how to do this ... the other answer is to understand why the
hidden columns are creating a problem ...

Thaks in advance ...

Steve


--
steven_thomas
------------------------------------------------------------------------
steven_thomas's Profile: http://www.excelforum.com/member.php...o&userid=27568
View this thread: http://www.excelforum.com/showthread...hreadid=470897



All times are GMT +1. The time now is 07:24 AM.

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