Type Info:
Count As Long
Dim Groups As Groups Dim NumberOfGroups As Long Set Groups = Application.ActiveProjectFile.SubFiles(1).Groups NumberOfGroups = Groups.Count