ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A recorded Macro to hide certain selected columns hides non selec. (https://www.excelbanter.com/excel-programming/319875-recorded-macro-hide-certain-selected-columns-hides-non-selec.html)

Mlmotter

A recorded Macro to hide certain selected columns hides non selec.
 
I have recorded a macro to hide certain columns (E, F, G, L, N, O, P, Q,
S:AA) in a spreadsheet which when I do it manually works fine. When I run
the the macro it hides everything from B to AA. Why? How can I fix this. I
have tried just hiding one column with the macro and it still hides them all.
The Spreadsheet has merged columns, but that does not seem to be a problem
when done manually.

Dave Peterson[_5_]

A recorded Macro to hide certain selected columns hides non selec.
 
with worksheets("sheet1")
.range("e:g,l:l,n:q,s:aa").entirecolumn.hidden = true
end with

If this doesn't help, you may want to post your code.

Mlmotter wrote:

I have recorded a macro to hide certain columns (E, F, G, L, N, O, P, Q,
S:AA) in a spreadsheet which when I do it manually works fine. When I run
the the macro it hides everything from B to AA. Why? How can I fix this. I
have tried just hiding one column with the macro and it still hides them all.
The Spreadsheet has merged columns, but that does not seem to be a problem
when done manually.


--

Dave Peterson

Bob Phillips[_6_]

A recorded Macro to hide certain selected columns hides non selec.
 
If you post the code it might help.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Mlmotter" wrote in message
...
I have recorded a macro to hide certain columns (E, F, G, L, N, O, P, Q,
S:AA) in a spreadsheet which when I do it manually works fine. When I run
the the macro it hides everything from B to AA. Why? How can I fix this.

I
have tried just hiding one column with the macro and it still hides them

all.
The Spreadsheet has merged columns, but that does not seem to be a

problem
when done manually.





All times are GMT +1. The time now is 10:39 PM.

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