Problem with the excel protection....Please help.

G

Guest

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
 
M

Mike A

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.
 
T

Tom Ogilvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top