Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In one of my lotusscript code, I output some data to excel. Initially I only allow the user to print and not make any changes to the spreadsheet. But then the user request that they want to resize the cell, adjust height etc before printing and that these changes can be saved. But I don't want them to change the data inside. Is that possible? If I set the whole excel file as read-only then the user won't be allowed to save any changes at all including the cell resizing.

share|improve this question
    
How are you creating the excel file? What is the code to do so? Do you want this to occur as it is created? Do you want to go into each file and make this happen? –  Raystafarian Jul 29 '13 at 9:01
    
I create a an excel file without data but only some titles, header etc (consider this a template). This template is the store into the database. The lotusscript code will extract the excel template when it is needed and populate data into it. Once it's done, it'll popup to the user. For now I already set so that the user can't do anything except print it. But now they want to at least resize the cell etc because when it came out it won't be properly aligned etc. But I don't want the data to compromise. –  Baxter BXTR Jul 29 '13 at 16:10

1 Answer 1

up vote 0 down vote accepted

Unlock the sheet and Throw this into the VBA and run it. It will do what you're looking for for the activesheet. Replace "Password" with your password.

sub baxter()
ActiveSheet.Protect "Password", AllowFormattingRows:=True, AllowFormattingColumns:=True
end sub
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.