Hi folks:
When I run the code below I get an Else without If error. I am newbie to VBA so this may be easy for someone with experience.
When I run the code below I get an Else without If error. I am newbie to VBA so this may be easy for someone with experience.
Sub sheets()
Dim sourceFile As String
Dim destFile As String
sourceFile = "DBboard.xls"
destFile = Workbooks(sFile).Path & "\Fixed Assests.xls"
If Len(Dir(destFile)) > 0 Then
With Workbooks.Open(destFile)
.Worksheets(1).Cells.Copy Workbooks(sFile).Worksheets("Fixed Assets").Range("A1")
Else
If Len(Dir(sFileToOpen)) <> 0 Then
MsgBox "Test"
.Close savechanges:=False
End If
End With
End Sub