I select a month from a drop-down list and only want to select "August" or "September". When I run this code, I get a "Compile error" - Type mismatch? The problem seems to be "August"?
Thanks in advance
![]()
Private Sub OKButton_Click() Dim MonthDB As Range If Range("MonthDB") Is "August" Then Sheets("PrincipalsAugust2011").Activate Range("A2").Select Exit Sub ElseIf Range("MonthDB") Is "September" Then Sheets("PrincipalsSeptember2011").Activate Range("A2").Select Exit Sub Else Unload Me End If End Sub
Bookmarks