Results 1 to 5 of 5

Progress indicator for macro that loops through each worksheet

Threaded View

gazza365 Progress indicator for macro... 02-17-2011, 10:11 PM
6StringJazzer Re: Progress indicator for... 02-17-2011, 10:22 PM
gazza365 Re: Progress indicator for... 02-17-2011, 10:30 PM
6StringJazzer Re: Progress indicator for... 02-17-2011, 10:37 PM
gazza365 Re: Progress indicator for... 02-17-2011, 10:48 PM
  1. #1
    Registered User
    Join Date
    11-09-2010
    Location
    Auckland, New Zealand
    MS-Off Ver
    Excel 2007
    Posts
    32

    Progress indicator for macro that loops through each worksheet

    Hi all,

    Thanks in advance for any help.

    I have a macro that goes through each worksheet and clears all of the unlocked cells (sets their value to "").

    Sub ClearUnlockedCells()
    Application.ScreenUpdating = False
    Dim sh As Worksheet
    Dim cell As Range
    For Each sh In ThisWorkbook.Sheets
    For Each cell In sh.UsedRange
    If cell.Locked = False Then cell.Value = ""
    Next
    Next
    Application.ScreenUpdating = True
    End Sub
    This macro takes a while to run so I'd like to add in a progress indicator. I've found a lot of examples for how to build one using a Userform (such as http://spreadsheetpage.com/index.php...ress_indicator[/HTML]) but I can't figure out how to connect the progress indicator to the actual progress of my macro. I'm quite new to VBA so forgive me if this is really simple.

    Cheers
    Gareth
    Last edited by gazza365; 02-17-2011 at 10:51 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1