Link to home
Start Free TrialLog in
Avatar of Jimbo99999
Jimbo99999Flag for United States of America

asked on

VB.Net - Output to Excel as ReadOnly

Good Day Experts!

I have Excel outputting from my VB.Net application.  Now I need to make the Excel output ReadOnly.  I have tried oWB.ReadOnly = True, with oWB being the Workbook, but I am not allowed to do that.

How can I make the Excel output ReadOnly?

Thanks,
jimbo99999
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jimbo99999

ASKER

I apologize as I did not include enough background.  These Excel outputs are generated by the Users that have my application.  When they generate the Excel, we don't want them to be able to edit any of the data.
That's what protecting the workbook will do.
I finally was able to get it to work. Just thought there would be a ReadOnly setting I could make programatically that would not allow editing when trying ot type in  it.  The pop-up box indicating password protection directing the User how to unprotect will have to be acceptable.  

Thanks,
jimbo99999