unhiding sheet based cell
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

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

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

Ben has attended:
Excel VBA Intro Intermediate course

Unhiding sheet based on cell value

Hi,

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

Else

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

End If

End Sub

For upcoming training course dates see: Pricing & availability

replyReply Mon 18 Apr 2011, 09:21Trainer 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

Regards

Stephen

 

Please browse our web site to find out more about
microsoft+excel+training+course and other Microsoft training courses.

Excel tip:

Charts

Select the data and press the function key F11 and the chart will be created on a separate worksheet.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard