Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
select column
hi,
turns out there were some merged cells. ok here is another problem... so if the column is ALREADY hidden, how can i add some error/process handling to the following: Columns("D").Select Selection.EntireColumn.Hidden = True thanks in advance, geebee "JLGWhiz" wrote: Aside from possibly having merged cells somewhere in the column, I don't know what would cause that. However, as a sidepoint, if you are selecting the entire column you don't need the attenuation colon. Just do Columns("D").Select You only need the attenuation colon if you are selecting more than one column. "geebee" wrote: hi, I have the following: Columns("D:D").Select for some reason columns C AND D are being selected? why? thanks in advance, geebee |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
select column
First off, the functionality of the two statements you listed can be
accomplished with this single statement... Columns("D").Hidden = True Executing this statement when the column is already hidden will not generate an error, so I am guessing you have other code following the code you showed us which you do not wish to have executed if the column is already hidden. Something like this should do what (I think) you want... If Not Columns("D").Hidden Then Columns("D").Hidden = True: Print "Hello" ' ' <<Your other code ' End If Rick "geebee" (noSPAMs) wrote in message ... hi, turns out there were some merged cells. ok here is another problem... so if the column is ALREADY hidden, how can i add some error/process handling to the following: Columns("D").Select Selection.EntireColumn.Hidden = True thanks in advance, geebee "JLGWhiz" wrote: Aside from possibly having merged cells somewhere in the column, I don't know what would cause that. However, as a sidepoint, if you are selecting the entire column you don't need the attenuation colon. Just do Columns("D").Select You only need the attenuation colon if you are selecting more than one column. "geebee" wrote: hi, I have the following: Columns("D:D").Select for some reason columns C AND D are being selected? why? thanks in advance, geebee |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA: Column Select then Data Select then return to cell A1 | Excel Discussion (Misc queries) | |||
select a column, then add rows of each column | Excel Discussion (Misc queries) | |||
how to select a single column when this column cross a merged cell | Excel Programming | |||
Shortcut to select column with data in previous column | Excel Discussion (Misc queries) | |||
select detail in column B if column A = date | Excel Worksheet Functions |