We help IT Professionals succeed at work.
Get Started

Get Sheet tab to appear, to Select it.

61 Views
Last Modified: 2019-11-30
Hello, I am having an issue with Ln 5 and 6.  The sheet name is not one of the ones that I want to leave alone.  Issue is Unable to set the Visible property of the worksheet class?
Any ideas?  Please advise and thanks.


Do 
        n = n + 1
        If Worksheets(n).Name <> "Budget Items" And Worksheets(n).Name <> "MasterPrimaryDepositAccount" And Worksheets(n).Name <> "DefaultAccountPg" And Worksheets(n).Name <> "BudgetSummaryPg" Then
           CurrentSheetTab = Worksheets(n).Name
           Sheets(CurrentSheetTab).Visible = True
           Sheets(CurrentSheetTab).Select
           Range("G4").Select
           CurrBal = ActiveCell.Value
           Sheets("BudgetSummaryPg").Select
           Range("A5").Select
           Do While Not ActiveCell = ""
                If ActiveCell = CurrentSheetTab Then
                    ActiveCell.Offset(0, 3).Select
                    ActiveCell.Value = CurrBal
                    Sheets(CurrentSheetTab).Select
                    Sheets(CurrentSheetTab).Visible = False
                    Exit Do
                Else
                    ActiveCell.Offset(1, 0).Select
                End If
            Loop
        End If
    Loop Until n = Worksheets.Count

Open in new window

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant

An Experts Exchange subscription includes unlimited access to online courses.

Get Started
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE