From: baz on
I am using Windows XP and Excel 2002.

I have written a small code in THIS WORKBOOK.
I want to know if there is a way to protect anyone else from going into VB
editor and seeing the code? I'd like to make it not visible except to me or
by password just for the code.

Thanks in advance.
From: Mike H on
Baz,

In VB editor click the TOOLS menu, Project properties, Protection tab and
set a password.

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"baz" wrote:

> I am using Windows XP and Excel 2002.
>
> I have written a small code in THIS WORKBOOK.
> I want to know if there is a way to protect anyone else from going into VB
> editor and seeing the code? I'd like to make it not visible except to me or
> by password just for the code.
>
> Thanks in advance.
From: Dave Peterson on
Open excel
open your workbook
Open the VBE (alt-f11 is a quick way)
hit ctrl-r to see the project explorer
select your workbook's project
Tools|VBAProject Properties|protection tab
Lock it from viewing and give it a memorable password.

Save the workbook, close it and reopen it to verify that it does what you want.

Be aware that this password like any other password can be broken by anyone who
wants to badly enough.

baz wrote:
>
> I am using Windows XP and Excel 2002.
>
> I have written a small code in THIS WORKBOOK.
> I want to know if there is a way to protect anyone else from going into VB
> editor and seeing the code? I'd like to make it not visible except to me or
> by password just for the code.
>
> Thanks in advance.

--

Dave Peterson
From: Jacob Skaria on
From VBE check out menu Tools>Workbook Properties>Protection tab

--
Jacob (MVP - Excel)


"baz" wrote:

> I am using Windows XP and Excel 2002.
>
> I have written a small code in THIS WORKBOOK.
> I want to know if there is a way to protect anyone else from going into VB
> editor and seeing the code? I'd like to make it not visible except to me or
> by password just for the code.
>
> Thanks in advance.
From: baz on
Thank you Mike and Jacob. Truly appreciated and it is so simple.

baz

"Jacob Skaria" wrote:

> From VBE check out menu Tools>Workbook Properties>Protection tab
>
> --
> Jacob (MVP - Excel)
>
>
> "baz" wrote:
>
> > I am using Windows XP and Excel 2002.
> >
> > I have written a small code in THIS WORKBOOK.
> > I want to know if there is a way to protect anyone else from going into VB
> > editor and seeing the code? I'd like to make it not visible except to me or
> > by password just for the code.
> >
> > Thanks in advance.