Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi, I want to set up a looping macro in VBA so that it looks at the first column of the work book and if this is empty, the entire row is hidden. I have got the code below - the lopping works just cant get the correct code for hidding the row. SUB PRINTPAGE() DIM MAIN AS WORKSHEET DIM MROW AS LONG SET MAIN = THISWORKBOOK.WORKSHEETS(\"WORKPLANNER\") MROW = 8 DO UNTIL MROW = 352 IF MAIN.CELLS(MROW, 1) = \"\" THEN -MAIN.CELLS(MROW, \"\") = \"TEST\"-ELSE END IF MROW = MROW + 1 LOOP END SUB also when i print a worksheet with a number of hidden rows is there a way for Excel to ignore these completely. Thanks Steven -- sarcher ------------------------------------------------------------------------ sarcher's Profile: http://www.excelforum.com/member.php...o&userid=34457 View this thread: http://www.excelforum.com/showthread...hreadid=542123 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
resetting last cell | Excel Discussion (Misc queries) | |||
print area selection slows excel, formula for hiding rows?? | Excel Discussion (Misc queries) | |||
Macro to delete rows with same data | Excel Worksheet Functions | |||
Hiding rows before printing | Excel Discussion (Misc queries) | |||
Adding Rows to Master Sheet | New Users to Excel |