View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Karen53 Karen53 is offline
external usenet poster
 
Posts: 333
Default UserInterfaceOnly

Hi ron,

I'm confused by something. I've recorded my macro with a password yet the
password does not show up in the code. Don't I need the password? How do I
reset if if I unprotect the sheet? I'm in 2003.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFiltering:=True
--
Thanks for your help.
Karen53


"Ron de Bruin" wrote:

-No need for userinterfaceonly in the newer Excel versions

Record a macro when you do your steps manual and look at the code in 2002 and up

You need the code on Debra's site in 97-2000

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Karen53" wrote in message ...
Hi Ron,

Thank you so much for the information! I needed it!

I haven't gotten there yet, though. If you look at my code the
userinterfaceonly:=True is in lower case. I type them in lower case so when
it's correct and accepted Excel adds the case formatting. Excel is not doing
so with the userinterfaceonly. I see no typing errors. Shouldn't some of
the letters be capitalized like the others?

--
Thanks for your help.
Karen53


"Ron de Bruin" wrote:

See
http://www.contextures.com/xlautofilter03.html#Protect

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Karen53" wrote in message ...
Hi,

I've been trying to put this in my workbook but the userinterfaceonly is not
picking up. Is there something else I need to do?

Private Sub Workbook_Open()

Dim wkSheet As Worksheet

For Each wkSheet In Worksheets
wkSheet.Protect Password:="pw", _
userinterfaceonly:=True, _
AllowFormattingCells:=True, _
AllowFiltering:=True
Next wkSheet

End Sub

--
Thanks for your help.
Karen53