Thread: If Then Else
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Sandy is offline
external usenet poster
 
Posts: 270
Default If Then Else

What am I doing wrong in this simple statement - it fails in the line
just before **Do Stuff**

Dim myFileName, myName, myWorkbookName As String
myName = Sheets("Data Input").Range("D1").Value
myFileName = "Personal Data-" & myName & ".xls"
myWorkbookName = ActiveWorkbook.Name

If "Personal Data.xls" = ActiveWorkbook.Name Then
GoTo myMark
ElseIf
myWorkbookName < myFileName Then

***** Do Stuff********

End If

Thanks Sandy