Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default UserInterfaceOnly

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default UserInterfaceOnly

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default UserInterfaceOnly

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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default UserInterfaceOnly

-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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default UserInterfaceOnly

Ron,

Since I'm using 2003 I don't need to set it? It's that way automatically?
Great!

Thanks!
--
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




  #6   Report Post  
Posted to microsoft.public.excel.programming
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


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default UserInterfaceOnly


I've recorded my macro with a password yet the
password does not show up in the code.


I would assume that the macro recorder doesn't insert the password into
recorded code as a security measure. If you are using a password, you may
not want it the code for anyone to see.

You can modify the recorded code to include a password and the UI flag:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True, Password:="abc", userinterfaceonly:=True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Karen53" wrote in message
...
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



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default UserInterfaceOnly

Thank you, Chip! The password did work.

Unfortunately, I need to add and delete rows which requires my removing and
adding the protection and password. the same with the workbook protection as
I need to add, move and delete worksheets. I do have my vba code password
protected as well.

I am concerned that my add worksheet routine takes so long. I have
screenupdating turned off. The process inserts quite a few links between the
main page and the newly created sheet as well as placing the new sheet in
order by unit number. Is it normal for it to take quite a while or do I have
a problem? I would appreciate any suggestions you may have.

--
Thanks for your help.
Karen53


"Chip Pearson" wrote:


I've recorded my macro with a password yet the
password does not show up in the code.


I would assume that the macro recorder doesn't insert the password into
recorded code as a security measure. If you are using a password, you may
not want it the code for anyone to see.

You can modify the recorded code to include a password and the UI flag:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, _
Scenarios:=True, Password:="abc", userinterfaceonly:=True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Karen53" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userinterfaceonly Tami Excel Worksheet Functions 5 August 31st 09 07:37 PM
UserInterfaceOnly question. Ken Johnson Excel Programming 9 April 21st 07 03:56 PM
UserInterfaceOnly D.Parker Excel Discussion (Misc queries) 1 May 17th 05 08:51 PM
UserInterfaceOnly on the Mac rgarber50[_3_] Excel Programming 0 September 26th 04 12:04 AM
UserInterfaceOnly on the Mac rgarber50[_2_] Excel Programming 1 September 25th 04 05:28 PM


All times are GMT +1. The time now is 04:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"