R
Robert Christie
Hi
I'm trying to name a .TXT file opened in excel, if cell A2 contains within
it's value the words "List........".
I was able to name the first "Output1" but on running the code on the
another file error 1004 appeared saying I cannot name the file with the same
name.
Could you explain the error in my code?
Or a different method.
If Range("A2").Value <> "List with Date of Birth" Then
ActiveSheet.Name = "Output1"
Else
If Range("A2").Value <> "List of School Card" Then
ActiveSheet.Name = "Output2"
Else
If Range("A2").Value <> "List of ATSI Students with " Then
ActiveSheet.Name = "Output3"
End If
End If
End If
TIA
--
Thank you
Regards
Bob C
Using Windows XP Home + Office 2003 Pro
I'm trying to name a .TXT file opened in excel, if cell A2 contains within
it's value the words "List........".
I was able to name the first "Output1" but on running the code on the
another file error 1004 appeared saying I cannot name the file with the same
name.
Could you explain the error in my code?
Or a different method.
If Range("A2").Value <> "List with Date of Birth" Then
ActiveSheet.Name = "Output1"
Else
If Range("A2").Value <> "List of School Card" Then
ActiveSheet.Name = "Output2"
Else
If Range("A2").Value <> "List of ATSI Students with " Then
ActiveSheet.Name = "Output3"
End If
End If
End If
TIA
--
Thank you
Regards
Bob C
Using Windows XP Home + Office 2003 Pro