Identify Load Drive
sDrive = left(thisworkbook.Path,1)
if ucase(sDrive) = "C" or ucase(sDrive) = "D" then
of course if macros are disabled, this code won't run.
--
Regards,
Tom Ogilvy
"Brian C" wrote in message
...
Hi,
I'm trying to figure out how to write VBA code to identify the drive
letter
that a spreadsheet (in Excel 2000) was loaded from, and then to delete a
worksheet if it was loaded from drive C or D.
The idea is to prevent users from saving a copy of the spreadsheet to
their
local drive. I also want to create a text message that tells them they
must
go to the central drive to use this sheet.
I'd appreciate any help.
Thanks,
Brian
|