Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 protect not working in Excel 97


Hi I have created a program that unprotects the reprotects as user
press buttons etc which works fine in Office 2000 and office 2003, bu
the users of the program are still running Office 97, with which th
code returns an error.


This is my general syntax:


Sub ProtectAll()
Sheets("sheet1").Protect
Sheets("sheet2").Protect
Sheets("sheet3").Protect
End Sub


Sub UnProtectAll()
Sheets("sheet1").Unprotect
Sheets("sheet2").Unprotect
Sheets("sheet3").Unprotect
End Sub

Any advice would be greatly appreciated.
As far as I can see the help from 97 vs 2003 is the sam

--
norman1n
-----------------------------------------------------------------------
norman1nz's Profile: http://www.excelforum.com/member.php...fo&userid=2715
View this thread: http://www.excelforum.com/showthread.php?threadid=47666

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Excel 2003 protect not working in Excel 97

those work in excel97 for me, are there any passwords?

--


Gary


"norman1nz" wrote
in message ...

Hi I have created a program that unprotects the reprotects as users
press buttons etc which works fine in Office 2000 and office 2003, but
the users of the program are still running Office 97, with which the
code returns an error.


This is my general syntax:


Sub ProtectAll()
Sheets("sheet1").Protect
Sheets("sheet2").Protect
Sheets("sheet3").Protect
End Sub


Sub UnProtectAll()
Sheets("sheet1").Unprotect
Sheets("sheet2").Unprotect
Sheets("sheet3").Unprotect
End Sub

Any advice would be greatly appreciated.
As far as I can see the help from 97 vs 2003 is the same


--
norman1nz
------------------------------------------------------------------------
norman1nz's Profile:
http://www.excelforum.com/member.php...o&userid=27155
View this thread: http://www.excelforum.com/showthread...hreadid=476660



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel 2003 protect not working in Excel 97

If you are calling this from a commandbutton, then change the
TakeFocusOnClick property to false

If it is another type of control from the control toolbox toolbar, then as
the first line of code in the event, place

ActiveCell.Activate

--
Regards,
Tom Ogilvy


"norman1nz" wrote
in message ...

Hi I have created a program that unprotects the reprotects as users
press buttons etc which works fine in Office 2000 and office 2003, but
the users of the program are still running Office 97, with which the
code returns an error.


This is my general syntax:


Sub ProtectAll()
Sheets("sheet1").Protect
Sheets("sheet2").Protect
Sheets("sheet3").Protect
End Sub


Sub UnProtectAll()
Sheets("sheet1").Unprotect
Sheets("sheet2").Unprotect
Sheets("sheet3").Unprotect
End Sub

Any advice would be greatly appreciated.
As far as I can see the help from 97 vs 2003 is the same


--
norman1nz
------------------------------------------------------------------------
norman1nz's Profile:

http://www.excelforum.com/member.php...o&userid=27155
View this thread: http://www.excelforum.com/showthread...hreadid=476660



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 protect not working in Excel 97


Tom Ogilvy Wrote:
If you are calling this from a commandbutton, then change the
TakeFocusOnClick property to false

If it is another type of control from the control toolbox toolbar, then
as
the first line of code in the event, place

ActiveCell.Activate

--
Regards,
Tom Ogilvy



Thanks for the tip
Does that only need to be done for Excel 97? Strange. Because it works
fine without activating a cell before protecting in 2000/2003. I will
try this tonight


--
norman1nz
------------------------------------------------------------------------
norman1nz's Profile: http://www.excelforum.com/member.php...o&userid=27155
View this thread: http://www.excelforum.com/showthread...hreadid=476660

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel 2003 protect not working in Excel 97

It only has to be done in xl97, but it doesn't cause a problem in other
versions - so you don't need a separate code base for xl97.

--
Regards,
Tom Ogilvy

"norman1nz" wrote
in message ...

Tom Ogilvy Wrote:
If you are calling this from a commandbutton, then change the
TakeFocusOnClick property to false

If it is another type of control from the control toolbox toolbar, then
as
the first line of code in the event, place

ActiveCell.Activate

--
Regards,
Tom Ogilvy



Thanks for the tip
Does that only need to be done for Excel 97? Strange. Because it works
fine without activating a cell before protecting in 2000/2003. I will
try this tonight


--
norman1nz
------------------------------------------------------------------------
norman1nz's Profile:

http://www.excelforum.com/member.php...o&userid=27155
View this thread: http://www.excelforum.com/showthread...hreadid=476660





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
Excel 2003 Protect file from being deleted L. Roper Excel Discussion (Misc queries) 1 February 27th 08 04:05 PM
Can't protect some cells in Excel 2003 JMC Excel Discussion (Misc queries) 1 July 26th 06 03:36 PM
In Excel 2003 can you password protect a single page in excel? R Shields Excel Worksheet Functions 3 July 22nd 06 08:23 PM
VB to protect cells not working in Excel 2003? cottage6 Excel Programming 3 October 14th 05 10:56 PM
Macro working in Excel 2003; not working in Excel 2000 Leslie Barberie Excel Programming 5 May 20th 04 07:51 PM


All times are GMT +1. The time now is 12:15 AM.

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

About Us

"It's about Microsoft Excel"