unhiding sheet based cell
Request a callback

We'll call during UK business hours

0207 987 3777

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Unhiding sheet based on cell value

Unhiding sheet based on cell value

resolvedResolved · Medium Priority · Version 2003

Thu 14 Apr 2011, 17:14 replyReply Delegate Ben said...

Ben has attended:
Excel VBA Intro Intermediate course

Unhiding sheet based on cell value


I have a number of worksheets hidden, however i want to unhide the sheets if a cell (u8, on the data entry tab) value = true.

I've tried the following, but i keep getting prof1 is a invalid qualifier.

Option Explicit
Option Compare Text

Dim prof1 As String

Sub unhide()

Sheets("Data Entry").Range("u8").Text = prof1

If prof1.Value = True Then

Sheets("Profile 1 - Expo. Rating").Visible = True


Sheets("Profile 1 - Expo. Rating").Visible = False

End If

End Sub

For upcoming training course dates see: Pricing & availability

Mon 18 Apr 2011, 09:21 replyReply Trainer Stephen said...

RE: Unhiding sheet based on cell value

Hi Ben

Thanks for your question

Prof, in your example is a simple string value. Thus the term prof.value has no meaning.

"If Prof = True", would be the correct construct




Excel tip:

Jumping Across the Excel Screen

PgDn and PgUp keys scrolls up and down a screen page in most applications.

Alt+PgDn and Alt+PgUp is the equivalent across the spreadsheet.

View all Excel hints and tips

Training courses
London & UK

Live dates & prices »

On-site training

Get a quote »


Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel training
Course rating
4.7 stars - based on 26755 reviews
Microsoft Certified Partner Institute of Leadership and Management - Certified Courses Learning and Performance Institute - Accredited Training Provider Security Seal verified by visa, mastercard securecard

Connect with us: Google+ · Facebook · Twitter · LinkedIn · Pinterest

2nd Floor, CA House, 1 Northey Street
Limehouse Basin, London, E14 8BT
United Kingdom