Display Active Worksheet

wmtsub

Active Member
Joined
Jun 20, 2018
Messages
322
My workbook can have hundreds of worksheets. I have a macro that wil loop thru them , activate each sheet, perform a funtion and then move to the next.
At times i can not always tell if it is runnng or hung up. How can i display a warning like "active Work sheet is (Sheet name)" and have it change as the focus changes so I can see that it is progressing? Kinda like a "msgbox" but not requiring an input.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi there. There are 2 ways to achieve this, either by using a userform or the status bar at the bottom. There are several examples on this forum, just put progress indicator into the search field.
 
Upvote 0
The reason your script may be running slow is your activating all your sheets.


In most cases you do not need to activate your sheets.

This sample script will put values in all the sheets in your Workbook without activating any sheets.

Code:
Sub Change_Value_All_My_Sheets()
'Modified 11/26/2018 9:57:52 AM  EST
Application.ScreenUpdating = False
Dim i As Long
For i = 1 To Sheets.Count
    With Sheets(i)
        .Cells(1, 1).Value = "Me"
        .Cells(1, 5).Value = "You"
    End With
Next
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top