Updating active worksheet (pg) #s (skipping hidden) -- Probably simple.. but..

adamstarr12

New Member
Joined
Jun 11, 2013
Messages
8
Hello Everyone,

I'm fairly inexperienced with vba, and realize things can be done/approached many different ways. I'm guessing I have made an incorrect starting approach.

I have one workbook that has about 100 tabs on it that I regularly use, and I just hide the tabs that I am not using. I would like each one of these tabs that I do NOT hide to have an "exhibit #" (or pg #) in cell A1 that I can automatically update after hiding some sheets and leaving others, by running a macro.

Here is what I have tried, and it works, but does not skip hidden pages :
For i = 0 To [v]
c = + 1
If < [v] Then Worksheets(c).Activate Else Exit For
[A1].Select
Selection.ClearContents
ActiveCell.FormulaR1C1 = "Exhibit " &
Next i

v- #visible pages


I'm wondering if anyone could recommend some instructions or modify this to perform.
Thank you very much!

A.S.
 
Last edited:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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