Below is some code that I got off a website and modified to determine the
location and name of a file. It has been working fine for the last couple of
years. We recently transitioned to XP and Office 2003. Now I'm getting a
compile error - "Can't find project or library" and the word "Right" is
highlighted.
'Set path, filename, and tab name
On Error Resume Next
Set sh = ActiveSheet
spath = ActiveWorkbook.Path
If Right(spath, 1) <> "\" Then spath = spath & "\"
Name = spath & ActiveWorkbook.Name
CodeName = sh.CodeName
I've declared sh as Worksheet, spath as string, Name as string, and Codename
as string.
Has something changed in Office 2003 or do I have an error elsewhere?
Thanks,
--
Lee Kirts
Bookmarks