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

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
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,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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