none
Problem to see the worksheet RRS feed

  • Question

  • Hi,
    Currently I do not see one Worksheet called "config", to the workbook. Due to these codes

        Dim ConfigWS As Worksheet
        Set ConfigWS = Worksheets("config")
     
        For i = 2 To ConfigWS.Cells(Rows.Count, "C").End(xlUp).Row
        ...
    how to find out any hidden Worksheet?

    Many Thanks & Best Regards, Hua Min

    Friday, September 11, 2015 5:34 AM

Answers

  • Run the following code and see if it can select the worksheet and if it does then it should be visible.

    Sub ShowWorksheet()
        Worksheets("config").Visible = xlSheetVisible
        Worksheets("config").Select
    End Sub


    Regards, OssieMac


    • Edited by OssieMac Friday, September 11, 2015 7:47 AM
    • Marked as answer by Jackson_1990 Friday, September 11, 2015 8:39 AM
    Friday, September 11, 2015 7:47 AM

All replies

  •     For i = 2 To ConfigWS.Cells(Rows.Count, "C").End(xlUp).Row

    You say that you can't see the sheet due to the code. The above code is only part of the loop and does not explain how or why the worksheet is being hidden.

    However, if it is any help, the following code will unhide all worksheets in the workbook.

    Sub UnhideSheets()
        Dim ws As Worksheet
       
        For Each ws In Worksheets
            ws.Visible = xlSheetVisible
        Next ws
    End Sub

    The following code will unhide a single worksheet called "config"

    Worksheets("config").Visible = xlSheetVisible

    If this does not resolve your problem then please post all of the code in the loop that you say is causing the problem.


    Regards, OssieMac


    • Edited by OssieMac Friday, September 11, 2015 6:51 AM
    Friday, September 11, 2015 6:48 AM
  • Thanks. I've run your codes but then I still do not see any Worksheet called "config". I mean I can see the above codes only.

    But my only doubt is that I cannot find it out Worksheet called "config".


    Many Thanks & Best Regards, Hua Min

    Friday, September 11, 2015 6:58 AM
  • What happens when you run the following line of code?

    Worksheets("config").Visible = xlSheetVisible

    Do you get a Run-time error '9':    If so, then worksheet "config" does not exist.

    Are you sure that the worksheet is not visible and that it is simply not displayed because there are too many worksheets to display all names together? If this is the case then you might need to use the little arrows at the left hand end of where the worksheet tab names are displayed to scroll the tab names and display the ones you want.


    Regards, OssieMac

    Friday, September 11, 2015 7:15 AM
  • Many thanks.
    I do put your current code.

    I did ever see "config" worksheet does appear, when running the codes. But after having run the codes, I still do not see "config" worksheet.

    Many Thanks & Best Regards, Hua Min

    Friday, September 11, 2015 7:27 AM
  • Run the following code and see if it can select the worksheet and if it does then it should be visible.

    Sub ShowWorksheet()
        Worksheets("config").Visible = xlSheetVisible
        Worksheets("config").Select
    End Sub


    Regards, OssieMac


    • Edited by OssieMac Friday, September 11, 2015 7:47 AM
    • Marked as answer by Jackson_1990 Friday, September 11, 2015 8:39 AM
    Friday, September 11, 2015 7:47 AM