[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Read only Excel Property Using Lotus Script

Posted on 2010-09-04
6
Medium Priority
?
1,059 Views
Last Modified: 2013-12-18
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
Comment
Question by:mcjann
  • 2
4 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 33605452
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
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 2000 total points
ID: 33611904
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
 
LVL 22

Expert Comment

by:mbonaci
ID: 33936259
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
 
LVL 24

Expert Comment

by:Tracy
ID: 34026892
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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question