I have written an ap in VB6 that opens up an Excel spreadsheet as read only, because I don't want anyone to overwrite the file. I also don't want anyone to use the Save As feature to save the file somewhere else. Is there a way to lock the file or just prevent the users from using the Save As feature?
Here is the code I have so far:
Dim objQuote As Excel.Application
Dim objWorkBook As Excel.Workbook
Dim objWorkSheet As Excel.Worksheet
Set objQuote = New Excel.Application
Set objWorkBook = objQuote.Workbooks.Open("C:\File1.xls", , True)
objQuote.Visible = True
Thanks in advance,
elmorro
Here is the code I have so far:
Dim objQuote As Excel.Application
Dim objWorkBook As Excel.Workbook
Dim objWorkSheet As Excel.Worksheet
Set objQuote = New Excel.Application
Set objWorkBook = objQuote.Workbooks.Open("C:\File1.xls", , True)
objQuote.Visible = True
Thanks in advance,
elmorro