lock personal.xls project for viewing

I

icestationzbra

hi,

i have some functions and other stuff in personal.xls that i would lik
to protect from viewing. i tried viewing protection on this file like
would do on other files, but everytime it opens unprotected. any clues
anything i am doing wrong?

thanks,

mac
 
D

Dave Peterson

Inside the VBE:

Select the personal.xls project in the project explorer.

Tools|VBAProject Properties|Protection tab
check that box and give it a memorable password.
 
I

icestationzbra

dave,

you must have times when you take your car to the garage and it woul
not act up like it did on the road! it will behave as innocent as
freshly laid egg, and you end up getting egg on your face in front o
the mechanic... well, something like that happened to me now...

i had done what you suggested, several times over, before giving up an
posting here. after reading your email, i had a smirk on my face, an
thought, let me just give it another shot. and lo and behold, dar
thing worked!!!

i give up on excel... its benevolent on me only after you suggest... g
figure...

mac
 
I

icestationzbra

dave,

i had a couple of questions.

about personal.xls - every time i close excel, it asks me whether i
want to save changes to personal.xls in which case the macros will be
available next time. i have chosen 'yes' several times, yet this
message pops up. what gives? this file was originally created on xl 95,
could that be the issue? but i have saved it in xl 2k2 several times
over.

suppose i have selected some cells in a sheet, now i would like to
select the columns they belong to, or the rows they belong to, what is
the VBA for that? i would like to mimic Ctrl+Spacebar and Shft+Spacebar
for a selection of cells, if you will, in VBA. i thought
Selection.EntireColumn(/Row).Select would work, but it does not. please
advise.

thanks,

mac.
 
D

Dave Peterson

xl2002 likes to recalculate workbooks when you open them if they were created in
earlier versions of excel. I would have guessed that saving in xl2002 would fix
it.

But I've seen a few posts that say the only way they could fix this was by
recreating the workbook in xl2002.

Since it's you're personal.xls file (and contains mostly macros???), this should
be straight forward.

Make a backup of personal.xls before you start!

Open personal.xls, start a new workbook.
Off to the VBE.
ctrl-r to see the project explorer.

Drag all the modules & userforms to the new workbook.

Hide this workbook and close excel--answer yes to save this new workbook.

close excel and put the newly created workbook in the XLStart folder (use
windows explorer).
delete personal.xls
rename the new one to personal.xls

Then back to excel to test it out.

(Worse comes to worse, you still have the backup! You can rename it to
personalold.xls, open it up and continue to fix the new version.)

========
selection.entirecolumn.select
worked fine for me.
(well, if I had a range selected)

What happened when you did it?

You didn't have any special enableselection or scrollarea set did you?
 
Top