[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 417
  • Last Modified:

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
0
Jimbo99999
Asked:
Jimbo99999
  • 2
  • 2
1 Solution
 
CodeCruiserCommented:
Try the oWB.Protect method to apply password protection
0
 
Jimbo99999Author Commented:
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.
0
 
CodeCruiserCommented:
That's what protecting the workbook will do.
0
 
Jimbo99999Author Commented:
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now