How to check if sheet with specific name exist?

This simple solution shows how to check if sheet with specific name exist in worksheet.

Sub SheetExistChecking()
' Checking if name sheet is exists

On Error Resume Next 'if error happened code is running
' Sheet's name is activated
Sheets("NazwaArkusza").Select

' Error no 9 means lack of sheet name
' Error description "Subscript out of range"
If Err.Number = 9 Then
    ' Error info
    Debug.Print Err.Number
    Debug.Print Err.Description
Else
    ' No error - 0 means no error
    Debug.Print Err.Number
    Debug.Print Err.Description
End If

On Error GoTo 0 'return to normal error handling
End Sub

123 thoughts on “How to check if sheet with specific name exist?

  1. There is also another way to check if app’s needed sheets are still in workbook

    Dim i As Long
    Dim SheetName, HumoSheet, LT22Sheet, E2RSheet, RaportSheet As String
    
    With ThisWorkbook
        For i = 1 To .Sheets.Count    
            SheetName = .Sheets(i).Name    
            Select Case SheetName
        
                Case "Raport HumoVsWaga"
                RaportSheet = "ok"  
          
                Case "HUMO"
                HumoSheet = "ok"
                
                Case "LT22"
                LT22Sheet = "ok"
                
                Case "E2R"
                E2RSheet = "ok"
            
            End Select    
        Next
    
        If HumoSheet = "" Or LT22Sheet = "" Or E2RSheet = "" Or RaportSheet = "" Then
            MsgBox "Code has been stopped!" & Chr(10) & _
                    "Workbook must cointain following sheets:" & Chr(10) & _
                    "'Raport HumoVsWaga', 'HUMO', 'LT22', 'E2R'.", vbCritical, "APP INFO..."
            Exit Sub
        End If
    End With
    
  2. Pingback: gucci t shirt

  3. Pingback: hemp concentrate

  4. Pingback: mơ thấy cá lóc

  5. Pingback: nằm mơ thấy sấm sét

  6. Pingback: best dumps shop

  7. Pingback: mơ thấy bò cạp

  8. Pingback: Skrota bilen få pengar

  9. Pingback: mơ thấy em trai

  10. Pingback: mơ thấy đầu người

  11. Pingback: mơ thấy nhà đánh con gì

  12. Pingback: fake best swiss rolex clone

  13. Pingback: usa dumps with pin

  14. Pingback: best credit card dump sites

  15. Pingback: Tree Removal call now

  16. Pingback: cvv dump sites

  17. Pingback: white leaf

  18. Pingback: chiem bao thay rua

  19. Pingback: More Help

  20. Pingback: telegram forex signals

  21. Pingback: fake rolex

  22. Pingback: domain lookup

  23. Pingback: credit card dumps for sale

  24. Pingback: mơ thấy đi chợ

  25. Pingback: nằm mơ thấy phật bà quan âm

  26. Pingback: mơ thấy giày dép đánh con gì

  27. Pingback: nằm mơ thấy mình thắp hương

  28. Pingback: nằm mơ thấy cháy rừng

  29. Pingback: mơ thấy chìa khóa

  30. Pingback: mơ thấy ăn ổi

  31. Pingback: mơ thấy chim bồ câu đánh con gì

  32. Pingback: mơ cãi nhau đánh con gì

  33. Pingback: mơ thấy con sâu

  34. Pingback: mơ thấy thầy bói

  35. Pingback: nằm mơ thấy hoa sen

  36. Pingback: nằm mơ thấy ngựa đánh số gì

  37. Pingback: fakerolex.ru

  38. Pingback: mơ thấy sếp cũ

  39. Pingback: mơ thấy cầu vồng

  40. Pingback: mơ thấy bếp lửa cháy

  41. Pingback: mơ thấy con trâu đánh đề con gì

  42. Pingback: nằm mơ thấy hôn môi

  43. Pingback: https://www.technologystime.com/

  44. Pingback: nằm mơ thấy ốc đánh con gì

  45. Pingback: casino list

  46. Pingback: 먹튀검증

  47. Pingback: 토토사이트

  48. Pingback: 먹튀사이트

  49. Pingback: meja qq

  50. Pingback: richard mille aaa

  51. Pingback: wkuumgrz

  52. Pingback: how can i get viagra online

  53. Pingback: wat doet een viagra pil

  54. Pingback: how long does stomach pain from azithromycin last

  55. Pingback: buy cialis

  56. Pingback: buy generic viagra online

  57. Pingback: viagra 25 mg precio en farmacia

  58. Pingback: legit essay writing service reddit

  59. Pingback: what should i write for my research paper

  60. Pingback: write my essay uk reviews

  61. Pingback: essay write help

  62. Pingback: business and ethics essay

  63. Pingback: how can you get amoxicillin

  64. Pingback: lasix without prescription usa

  65. Pingback: azithromycin over the counter in us

  66. Pingback: ivermectin lotion price

  67. Pingback: albuterol 0.63 mg

  68. Pingback: doxycycline pictures

  69. Pingback: prednisolone 15mg 5ml

  70. Pingback: clomid contraindications

  71. Pingback: dapoxetine 30mg

  72. Pingback: diflucan headache

  73. Pingback: synthroid used for

  74. Pingback: buy propecia pills

  75. Pingback: neurontin for dogs

  76. Pingback: metformin dosing

  77. Pingback: paxil ptsd

  78. Pingback: plaquenil mechanism

  79. Pingback: buy cheap metformin online

  80. Pingback: propecia pills

  81. Pingback: gnc ed pills

  82. Pingback: non prescription erection pills

  83. Pingback: trusted canadian pharmacy

  84. Pingback: canadian online pharmacy cialis

  85. Pingback: ordering cialis online australia

  86. Pingback: canada online

  87. Pingback: international viagra online

  88. Pingback: lisinopril 20mg tablets

  89. Pingback: buy cialis in davenport fl

  90. Pingback: cialis 50 mg tablets

  91. Pingback: how to buy prescription drugs from canadian pharmacy

  92. Pingback: canadian no prescription pharmacy cialis

  93. Pingback: find cheap cialis online

  94. Pingback: most reliable canadian pharmacy

  95. Pingback: where can i buy cialis without a prescription

  96. Pingback: cialis commercial 2016

  97. Pingback: online pharmacy in turkey

  98. Pingback: buy cialis online europe

  99. Pingback: cost of cialis without insurance

  100. Pingback: buy cialis without perscription

  101. Pingback: treatment for ed

  102. Pingback: 3000mg valtrex

  103. Pingback: best ed treatment

  104. Pingback: best ed drug

  105. Pingback: buy generic 100mg viagra online

  106. Pingback: cialis price list

  107. Pingback: canadian viagra 100mg

  108. Pingback: interactions for voltaren

  109. Pingback: which ed drug is best

  110. Pingback: ed pills for sale

  111. Pingback: foods for ed

  112. Pingback: ivermectin gel

  113. Pingback: stromectol prices

  114. Pingback: hydroxychloroquine 300 mg tablet

  115. Pingback: ivermectin usa

  116. Pingback: ivermectin lice

  117. Pingback: hims ed pills

  118. Pingback: vacuum pumps for ed

  119. Pingback: viagra from canada

  120. Pingback: where to buy viagra online

  121. Pingback: buy cialis insurancecialis online without prescription

  122. Pingback: buy cialis philippines

Leave a Reply

Your email address will not be published. Required fields are marked *