Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I made the suggested changes and am still experiencing the "hang".
I'm running Microsoft Excel 2003(11.8146.8132) SP2 if that makes a difference? The code I tried again was: Private Sub CommandButton1_Click() Dim i As Long Range("a1").Select On Error GoTo errorhandler 'Turn screen updating and autocalculation off so it doesn't refresh for every time a row is hidden With Application ..Calculation = xlCalculationManual ..ScreenUpdating = False ..EnableEvents = False End With 'Perform loop starting in row 1004 and working "backwards" to row 7, one row 'at a time. For each row, if the value in the cell in column CK is 0, then 'hide the row. For i = 30 To 7 Step -1 If Cells(i, "ck") = 0 Then Rows(i).Hidden = True Next i errorhandler: 'Turn screen updating and autocalculation back on for normal operations With Application ..Calculation = xlCalculationAutomatic ..ScreenUpdating = True End With End Sub " wrote: I am having office 2000 and i copied and pasted your code in my module under "Sub Button1_Click()" It is working fine. Rgds, Kannan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Command button code does not execute | Excel Programming | |||
Macro won't execute from a Command Button | Excel Programming | |||
How do I execute command from button or hyperlink? | Excel Discussion (Misc queries) | |||
Command button - won't execute twice in sequence | Excel Programming | |||
Programming command button to execute on a different worksheet | Excel Programming |