Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Read only Excel Property Using Lotus Script

Posted on 2010-09-04
6
1,025 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
6 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 500 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:broomee9
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

808 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