There is nothing you can do about a user renaming the file. File naming is
handled by the operating system. You could write some code in the
Workbook_Open event in the ThisWorkbook module that checks the file name and
responds appropriately... something like this:
Private Sub Workbook_Open()
If ThisWorkbook.Name <> "Whatever.xls" Then
MsgBox "Bad file name"
End If
End Sub
--
HTH...
Jim Thomlinson
"Sethaholic" wrote:
>
> Hi,
>
> I programmed a macro that disables the "save as" function so that users
> won't be able to "save as" and rename the workbook to something else
> (for security purposes).
>
> However, users can still rename it manually outside the workbook. Is
> there a way that I can program something in VBA or somewhere else to
> prevent users from manually renaming a workbook?
>
> Many thanks!!!
>
>
> --
> Sethaholic
> ------------------------------------------------------------------------
> Sethaholic's Profile: http://www.excelforum.com/member.php...o&userid=25113
> View this thread: http://www.excelforum.com/showthread...hreadid=567534
>
>
Bookmarks