Hi All,
A very simple one here I'm sure but I am getting this error every time I try and use an If function in VBA. I'd like to know the fundamental error of my ways!
The Code is:
If sPath = "C:\" Then sPathFName2 = sPath & FName2
Else: sPathFName2 = sPath & "\" & FName2
End If
sPath, FName 2 and sPathFName2 are variables. sPath is the file path and FName 2 is the file name.
Every time I try and run the above I get 'Compile Error: End If without Block If'
Any help appreciated as always.
Cheers,
Mark
Bookmarks