keith05281967
Board Regular
- Joined
- May 6, 2011
- Messages
- 68
Greetings,
I have some code that populates a column based on the file name. It strips out the extension and changes the "day" in the date to 01. That part works fine.
I'm having a problem when I tried to add another condition with the "Or".
I'm getting "object required" error 424. I'm sure i'm overlooking something in the syntax.
sFile = ActiveWorkbook.Name
sFile = Replace(sFile, ".xls", "")
If InStr(1, sFile, "CAT_") Or sFile.Value = "BIGDOG" Then
Mid(sFile, Len(sFile2) - 5, 2) = "01"
End If
any help is appreciated.
thanks,
Keith
I have some code that populates a column based on the file name. It strips out the extension and changes the "day" in the date to 01. That part works fine.
I'm having a problem when I tried to add another condition with the "Or".
I'm getting "object required" error 424. I'm sure i'm overlooking something in the syntax.
sFile = ActiveWorkbook.Name
sFile = Replace(sFile, ".xls", "")
If InStr(1, sFile, "CAT_") Or sFile.Value = "BIGDOG" Then
Mid(sFile, Len(sFile2) - 5, 2) = "01"
End If
any help is appreciated.
thanks,
Keith