ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem with the excel protection....Please help. (https://www.excelbanter.com/excel-programming/309090-problem-excel-protection-please-help.html)

ANJAN

Problem with the excel protection....Please help.
 
Hi All,
I am creating the excel sheet through programming(Used Excel 2003 object
model) and allowed the user to edit some ranges on the sheet, Rest of the
sheet area has been protected with the password. When i open the excel file
which was generated through the programe as i mention above, is working fine
in Office XP, Office 2003 machine. But locking the entire sheet on Office 97
machine. Actually it should allow the user to edit the allowed ranges.
In Excel 2003 object model I am using the "Allow Users to Edit Ranges"
featur. I have created the excel sheet with the Excel 2003 object model.
This feature is not available in Office 97. So it is locking the entire sheet.
So please suggest some way, so that i can open the excel sheet on the
office 97 machine with out locking the entire sheet.

Its very urgent...

Thanks & Regards
Anjan


Mike A[_2_]

Problem with the excel protection....Please help.
 
Each version of Excel uses a number of new libraries (including the
object model). Newer libraries are generally compatible with older
code, but not the other way around. I have a couple of spreadsheets that
were written using Excel 2000 that won't run on Excel 97 because of a
new object - the spreadsheet control for user forms. I worked around it
by checking the Excel version and either using a spreadsheet control
(XL2000) or a list control (XL97) to display the recordset. To do this,
I created two separate user forms (and underlying code) for the same
data, creating one in each version of Excel. I was fortunate in this
case that I had only one object giving me a problem.

I don't have a clue if this will work, but you could try explicitly
including the files as references in the VBE, and copying the files to
the Excel 97 installation. (There may be a license issue here,
depending on the Excel version you are using!)

Always develop using the OLDEST version you expect your users to use to
open the spreadsheet.

--
Mike Argy
Custom Office solutions and
Windows/UNIX applications


Anjan wrote:

Hi All,
I am creating the excel sheet through programming(Used Excel 2003 object
model) and allowed the user to edit some ranges on the sheet, Rest of the
sheet area has been protected with the password. When i open the excel file
which was generated through the programe as i mention above, is working fine
in Office XP, Office 2003 machine. But locking the entire sheet on Office 97
machine. Actually it should allow the user to edit the allowed ranges.
In Excel 2003 object model I am using the "Allow Users to Edit Ranges"
featur. I have created the excel sheet with the Excel 2003 object model.
This feature is not available in Office 97. So it is locking the entire sheet.
So please suggest some way, so that i can open the excel sheet on the
office 97 machine with out locking the entire sheet.

Its very urgent...

Thanks & Regards
Anjan


Tom Ogilvy

Problem with the excel protection....Please help.
 
As you imply, xl97/xl2000 doesn't support the granularity you describe. In
those versions, the user can edit unlocked cells when the sheet it
protected. Possibly you can adjust your approach and do it that way. As
Mike suggested, it is best to develop in the lowest version of excel in
which the workbook will be used.

--
Regards,
Tom Ogilvy

"Anjan" wrote in message
...
Hi All,
I am creating the excel sheet through programming(Used Excel 2003

object
model) and allowed the user to edit some ranges on the sheet, Rest of the
sheet area has been protected with the password. When i open the excel

file
which was generated through the programe as i mention above, is working

fine
in Office XP, Office 2003 machine. But locking the entire sheet on Office

97
machine. Actually it should allow the user to edit the allowed ranges.
In Excel 2003 object model I am using the "Allow Users to Edit Ranges"
featur. I have created the excel sheet with the Excel 2003 object model.
This feature is not available in Office 97. So it is locking the entire

sheet.
So please suggest some way, so that i can open the excel sheet on the
office 97 machine with out locking the entire sheet.

Its very urgent...

Thanks & Regards
Anjan





All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com