[Webinar] Streamline your web hosting managementRegister Today

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

Read only Excel Property Using Lotus Script

Experts,

I am use Lotus Script to collect fields from selected and populate a specific Excel template. The report is meant to be a raw data export and I was hoping to add a read-only property to this file save entry. Can anyone help?
      
'identify and save the file
      x1App.ActiveWorkbook.SaveAs "H:\Data\"+ db.Title + " on " +RServer(0) + "_" + RDate +".xls"
      x1App.Application.ActiveWindow.Close (False)
      
      x1App.Application.Quit
      Set x1App=Nothing
0
mcjann
Asked:
mcjann
  • 2
1 Solution
 
mbonaciCommented:
All you can do to protect excel sheet is to use built-in protect worksheet option:

http://msdn.microsoft.com/en-us/library/dkcs53f3(VS.80).aspx
http://msdn.microsoft.com/en-us/library/aa174285(office.11).aspx


See here for previous Excel versions:
http://www.experts-exchange.com/Q_21622231.html
This is the correct link for Office 2003 (the one in the accepted comment doesn't work):
http://msdn.microsoft.com/en-us/library/aa204840(office.11).aspx
0
 
Rory ArchibaldCommented:
YOu can add a Read-only recommended property using the SaveAs method, or you can actually set the file attributes (it would be SetAttr in VBA).
0
 
mbonaciCommented:
Since we haven't received any response, I'm not really sure if my answer is what he really wanted to do...
When I read it now, it seems that rorya was on the right track.
0
 
TracyVBA DeveloperCommented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

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