![]() |
Hidden Columns
Running on AUTO_OPEN..
Columns("C:C").Select Selection.EntireColumn.Hidden = True Columns("J:J").Select Selection.EntireColumn.Hidden = True Columns("A:B").Select Selection.EntireColumn.Hidden = False Columns("D:I").Select Selection.EntireColumn.Hidden = False Columns("K:N").Select Selection.EntireColumn.Hidden = False ...but only Column J stays hidden. I ran a test..running automation to Excel w/ hidden columns..NO problem. Will that always be true? If so, best to Hide Columns C and J with no code? TIA - Bob |
Hidden Columns
hi,
what are you trying to do? I ran you code(that you posted) and it worked ok. i cleaned it up a little. Sub test1() Columns("C:C").EntireColumn.Hidden = True Columns("J:J").EntireColumn.Hidden = True Columns("A:B").EntireColumn.Hidden = False Columns("D:I").EntireColumn.Hidden = False Columns("K:N").EntireColumn.Hidden = False End Sub what do you mean "only J stays hidden"? you ran a test with hidden columns. what was no problem? confused FSt1 "Bob Barnes" wrote: Running on AUTO_OPEN.. Columns("C:C").Select Selection.EntireColumn.Hidden = True Columns("J:J").Select Selection.EntireColumn.Hidden = True Columns("A:B").Select Selection.EntireColumn.Hidden = False Columns("D:I").Select Selection.EntireColumn.Hidden = False Columns("K:N").Select Selection.EntireColumn.Hidden = False ..but only Column J stays hidden. I ran a test..running automation to Excel w/ hidden columns..NO problem. Will that always be true? If so, best to Hide Columns C and J with no code? TIA - Bob |
Hidden Columns
I agree..I just ran your code..apparently, the line..
Columns("C:C").Select caused a problem. Your code looks good. The part about automating data to a hidden column..any idea if it could EVER cause a problem..in theory, it shouldn't. I'm primarily an Access developer. Thank you - Bob "FSt1" wrote: hi, what are you trying to do? I ran you code(that you posted) and it worked ok. i cleaned it up a little. Sub test1() Columns("C:C").EntireColumn.Hidden = True Columns("J:J").EntireColumn.Hidden = True Columns("A:B").EntireColumn.Hidden = False Columns("D:I").EntireColumn.Hidden = False Columns("K:N").EntireColumn.Hidden = False End Sub what do you mean "only J stays hidden"? you ran a test with hidden columns. what was no problem? confused FSt1 "Bob Barnes" wrote: Running on AUTO_OPEN.. Columns("C:C").Select Selection.EntireColumn.Hidden = True Columns("J:J").Select Selection.EntireColumn.Hidden = True Columns("A:B").Select Selection.EntireColumn.Hidden = False Columns("D:I").Select Selection.EntireColumn.Hidden = False Columns("K:N").Select Selection.EntireColumn.Hidden = False ..but only Column J stays hidden. I ran a test..running automation to Excel w/ hidden columns..NO problem. Will that always be true? If so, best to Hide Columns C and J with no code? TIA - Bob |
Hidden Columns
hi again.
sorry i took so long. ran into this visious ham sandwitch and his friend, pickle. the clean up just involved avoiding the select. makes code run a tad faster by eliminating a step. I am not aware of any problems associated with hidden columns and automation. the hidden property is boolean ie true/false. so you should be ok. I see nothing wrong with hiding and unhiding with code. Regards FSt1 "Bob Barnes" wrote: I agree..I just ran your code..apparently, the line.. Columns("C:C").Select caused a problem. Your code looks good. The part about automating data to a hidden column..any idea if it could EVER cause a problem..in theory, it shouldn't. I'm primarily an Access developer. Thank you - Bob "FSt1" wrote: hi, what are you trying to do? I ran you code(that you posted) and it worked ok. i cleaned it up a little. Sub test1() Columns("C:C").EntireColumn.Hidden = True Columns("J:J").EntireColumn.Hidden = True Columns("A:B").EntireColumn.Hidden = False Columns("D:I").EntireColumn.Hidden = False Columns("K:N").EntireColumn.Hidden = False End Sub what do you mean "only J stays hidden"? you ran a test with hidden columns. what was no problem? confused FSt1 "Bob Barnes" wrote: Running on AUTO_OPEN.. Columns("C:C").Select Selection.EntireColumn.Hidden = True Columns("J:J").Select Selection.EntireColumn.Hidden = True Columns("A:B").Select Selection.EntireColumn.Hidden = False Columns("D:I").Select Selection.EntireColumn.Hidden = False Columns("K:N").Select Selection.EntireColumn.Hidden = False ..but only Column J stays hidden. I ran a test..running automation to Excel w/ hidden columns..NO problem. Will that always be true? If so, best to Hide Columns C and J with no code? TIA - Bob |
Hidden Columns
"I see nothing wrong with hiding and unhiding with code."
Sounds good. Thank you - Bob "FSt1" wrote: hi again. sorry i took so long. ran into this visious ham sandwitch and his friend, pickle. the clean up just involved avoiding the select. makes code run a tad faster by eliminating a step. I am not aware of any problems associated with hidden columns and automation. the hidden property is boolean ie true/false. so you should be ok. I see nothing wrong with hiding and unhiding with code. Regards FSt1 "Bob Barnes" wrote: I agree..I just ran your code..apparently, the line.. Columns("C:C").Select caused a problem. Your code looks good. The part about automating data to a hidden column..any idea if it could EVER cause a problem..in theory, it shouldn't. I'm primarily an Access developer. Thank you - Bob "FSt1" wrote: hi, what are you trying to do? I ran you code(that you posted) and it worked ok. i cleaned it up a little. Sub test1() Columns("C:C").EntireColumn.Hidden = True Columns("J:J").EntireColumn.Hidden = True Columns("A:B").EntireColumn.Hidden = False Columns("D:I").EntireColumn.Hidden = False Columns("K:N").EntireColumn.Hidden = False End Sub what do you mean "only J stays hidden"? you ran a test with hidden columns. what was no problem? confused FSt1 "Bob Barnes" wrote: Running on AUTO_OPEN.. Columns("C:C").Select Selection.EntireColumn.Hidden = True Columns("J:J").Select Selection.EntireColumn.Hidden = True Columns("A:B").Select Selection.EntireColumn.Hidden = False Columns("D:I").Select Selection.EntireColumn.Hidden = False Columns("K:N").Select Selection.EntireColumn.Hidden = False ..but only Column J stays hidden. I ran a test..running automation to Excel w/ hidden columns..NO problem. Will that always be true? If so, best to Hide Columns C and J with no code? TIA - Bob |
Hidden Columns
glad to help
regards FSt1 "Bob Barnes" wrote: "I see nothing wrong with hiding and unhiding with code." Sounds good. Thank you - Bob "FSt1" wrote: hi again. sorry i took so long. ran into this visious ham sandwitch and his friend, pickle. the clean up just involved avoiding the select. makes code run a tad faster by eliminating a step. I am not aware of any problems associated with hidden columns and automation. the hidden property is boolean ie true/false. so you should be ok. I see nothing wrong with hiding and unhiding with code. Regards FSt1 "Bob Barnes" wrote: I agree..I just ran your code..apparently, the line.. Columns("C:C").Select caused a problem. Your code looks good. The part about automating data to a hidden column..any idea if it could EVER cause a problem..in theory, it shouldn't. I'm primarily an Access developer. Thank you - Bob "FSt1" wrote: hi, what are you trying to do? I ran you code(that you posted) and it worked ok. i cleaned it up a little. Sub test1() Columns("C:C").EntireColumn.Hidden = True Columns("J:J").EntireColumn.Hidden = True Columns("A:B").EntireColumn.Hidden = False Columns("D:I").EntireColumn.Hidden = False Columns("K:N").EntireColumn.Hidden = False End Sub what do you mean "only J stays hidden"? you ran a test with hidden columns. what was no problem? confused FSt1 "Bob Barnes" wrote: Running on AUTO_OPEN.. Columns("C:C").Select Selection.EntireColumn.Hidden = True Columns("J:J").Select Selection.EntireColumn.Hidden = True Columns("A:B").Select Selection.EntireColumn.Hidden = False Columns("D:I").Select Selection.EntireColumn.Hidden = False Columns("K:N").Select Selection.EntireColumn.Hidden = False ..but only Column J stays hidden. I ran a test..running automation to Excel w/ hidden columns..NO problem. Will that always be true? If so, best to Hide Columns C and J with no code? TIA - Bob |
Hidden Columns
Hi. Just two cents
Columns("C:C").EntireColumn.Hidden = True Columns("J:J").EntireColumn.Hidden = True No harm of course, but Columns("C:C") is the entire column, so it's redundant in the above version. If you wish... Columns("C:C").Hidden = True Columns("J:J").Hidden = True If you wish to combine them, then for some reason, Excel wants EntireColumn as in this version. Range("C:C,J:J").EntireColumn.Hidden = True Range("A:B,D:I,K:N").EntireColumn.Hidden = False Slightly shorter might be this idea: Columns("A:N").Hidden = False Range("C:C,J:J").EntireColumn.Hidden = True -- HTH Dana DeLouis "Bob Barnes" wrote in message ... "I see nothing wrong with hiding and unhiding with code." Sounds good. Thank you - Bob "FSt1" wrote: hi again. sorry i took so long. ran into this visious ham sandwitch and his friend, pickle. the clean up just involved avoiding the select. makes code run a tad faster by eliminating a step. I am not aware of any problems associated with hidden columns and automation. the hidden property is boolean ie true/false. so you should be ok. I see nothing wrong with hiding and unhiding with code. Regards FSt1 "Bob Barnes" wrote: I agree..I just ran your code..apparently, the line.. Columns("C:C").Select caused a problem. Your code looks good. The part about automating data to a hidden column..any idea if it could EVER cause a problem..in theory, it shouldn't. I'm primarily an Access developer. Thank you - Bob "FSt1" wrote: hi, what are you trying to do? I ran you code(that you posted) and it worked ok. i cleaned it up a little. Sub test1() Columns("C:C").EntireColumn.Hidden = True Columns("J:J").EntireColumn.Hidden = True Columns("A:B").EntireColumn.Hidden = False Columns("D:I").EntireColumn.Hidden = False Columns("K:N").EntireColumn.Hidden = False End Sub what do you mean "only J stays hidden"? you ran a test with hidden columns. what was no problem? confused FSt1 "Bob Barnes" wrote: Running on AUTO_OPEN.. Columns("C:C").Select Selection.EntireColumn.Hidden = True Columns("J:J").Select Selection.EntireColumn.Hidden = True Columns("A:B").Select Selection.EntireColumn.Hidden = False Columns("D:I").Select Selection.EntireColumn.Hidden = False Columns("K:N").Select Selection.EntireColumn.Hidden = False ..but only Column J stays hidden. I ran a test..running automation to Excel w/ hidden columns..NO problem. Will that always be true? If so, best to Hide Columns C and J with no code? TIA - Bob |
All times are GMT +1. The time now is 02:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com