Home Excel Powerpoint Word Outlook Error Codes

VBA Useful Codes

Welcome to the World of VBA
Home > VBAUsefulCodes

Number of Worksheets in a Workbook

Displays the count of no of worksheets in a workbook.It will be useful when you performing calculations based on sheets

Sub MySheetCount()
Dim myCount As Long
myCount = Application.Sheets.Count
MsgBox myCount
End Sub


Enter your e-mail below and get notified on the latest blog posts.


VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts

Follow Us