Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
even the codes in microsoft's help section don't work
i found this code by pressing screenupdating in the help section of vba. it
doesn't work. it says i is undefined. so i write dim i as integer. then it says starttime is undefined. Dim elapsedTime(2) Application.screenupdating = True For i = 1 To 2 If i = 2 Then Application.screenupdating = False startTime = Time Worksheets("Sheet1").Activate For Each c In ActiveSheet.Columns If c.Column Mod 2 = 0 Then c.Hidden = True End If Next c stopTime = Time elapsedTime(i) = (stopTime - startTime) * 24 * 60 * 60 Next i Application.screenupdating = True MsgBox "Elapsed time, screen updating on: " & elapsedTime(1) & _ " sec." & Chr(13) & _ "Elapsed time, screen updating off: " & elapsedTime(2) & _ " sec." |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I: If Pie Section Label = X, Make Pie Section Color = Y | Excel Programming | |||
Microsoft's drop down box | Excel Programming | |||
Excel 2007. How to Get Microsoft's Attention | Excel Programming |