Les,
you can disable a commandbar menu item
Sub Disable_ShareWorkbook_MenuItem()
'xl2003
Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=2040, Recursive:=True).Enabled = False
End Sub
can't help you with 2007 version.
--
jb
"Les Allan" wrote:
> I've got a workbook with a lot of code and want to prevent users from
> sharing the workbook. If they share the workbook, it only generates
> error messages for them and creates problems.
>
> If I could hide the command bar option or catch when they go to share
> the workbook and cancel the action, that would be great. But I
> searched high and low on how to do this with no luck. Users will be
> using XL 2002 up to 2007. Does anyone have any ideas or faced this
> challenge before?
>
> Les
> .
>
|