Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default My code is still not working -- Excel 2000 Worksheet protection

Hi;

I just about have a project for a shared workbook with a friend. I use
Excel 2002; he uses Excel 2000. I have got everything to mix and match
except for work sheet protection.

My code follows:

Public ThisExcelVersion As Variant

Sub ExecProtect()
'
' ExecProtect Macro
'
If ThisExcelVersion = 10 Then
MembList.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=False, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=True, _
AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=True, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True
Else
MembList.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True
End If
End Sub

In particular, I can not find any reassurance in my manuals, online, or
googleing that for the version 9 (i.e < version 10) that 'Password' is used
correctly. Any help welcomed. This little piece of code is breaking me and
a personal project that I am generally proud of and ready to share.

Regards Bill
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default My code is still not working -- Excel 2000 Worksheet protection

If you want to allow all those capabilities when the sheet is protected,
those things are not allowed in xl2000 - doesn't that affect the
functionality of your application?

What do you actually need to allow?

the structure of your second protection command is correct. So what
problem are you having - is it raising an error?

--
Regards,
Tom Ogilvy


"Bill Case" wrote:

Hi;

I just about have a project for a shared workbook with a friend. I use
Excel 2002; he uses Excel 2000. I have got everything to mix and match
except for work sheet protection.

My code follows:

Public ThisExcelVersion As Variant

Sub ExecProtect()
'
' ExecProtect Macro
'
If ThisExcelVersion = 10 Then
MembList.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=False, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=True, _
AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=True, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True
Else
MembList.Protect _
Password:="bill", _
DrawingObjects:=True, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True
End If
End Sub

In particular, I can not find any reassurance in my manuals, online, or
googleing that for the version 9 (i.e < version 10) that 'Password' is used
correctly. Any help welcomed. This little piece of code is breaking me and
a personal project that I am generally proud of and ready to share.

Regards Bill

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default My code is still not working -- Excel 2000 Worksheet protectio

Hi Tom;

An old lesson re-learned.

Sent off the post to the mailing list. Had a bite to eat watched some TV.
Then remembered I had corrected "Public ThisExcelVersion As Variant" from
"Public ThisExcelVersion As Integer" in passing on my version of the project,
but was still working with an older version on his machine that still had the
error. Going to check out the new version at his place now.

Thanks. Getting reassurance that code is right can save as much time has
having someone correctIng something that is wrong.

"Tom Ogilvy" wrote:

the structure of your second protection command is correct. So what
problem are you having - is it raising an error?

--
Regards,
Tom Ogilvy

Regards Bill
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
Using AutoFilter with worksheet protection in 2000 vs. 2003 gncook Excel Discussion (Misc queries) 3 July 25th 05 08:02 PM
worksheet protection excel 2000 vrs 2003 wtpcomplab Excel Programming 4 June 6th 05 05:37 PM
Excel 2000 AutoFilter and Worksheet protection Phillo Excel Programming 2 October 11th 04 02:54 PM
Excel 2000 VBA Code not working in Excel 2002 OldGuy[_2_] Excel Programming 1 August 6th 04 06:26 AM
Excel 2000 code not working in XP Shane J Excel Programming 2 January 31st 04 03:40 AM


All times are GMT +1. The time now is 10:22 PM.

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"