Hi,

Can anyone help me? how to write VBA code for current worksheets is maximum worksheets of workbook.

I have tried the code below, but got error

Sub maxsheets()

If ActiveSheet.Count = ActiveWorkbook.Worksheets.Count Then
MsgBox "max sheets of workbook"
End If

End Sub