automation

ctran
08-03-2000, 04:54 PM
Does anybody have any idea of how to load a text file onto an Excel platform and make that file as read only file so that users cannot change/edit the content of that file??? Remember, the file should be loaded as read only file(from hard code in VB coding window)
Please help/suggest. I try the automation sample in the help index, it works, but as far as checking error and making the file as read only in the Excel platform. I dont know how.

HCGL
10-10-2000, 09:41 AM
Hi,

How about:

Public Sub main()

Dim xl As Excel.Application

Set xl = New Excel.Application

xl.Workbooks.Open FileName:="c: est.txt", ReadOnly:=True
xl.Visible = True
'.
'.
'.
MsgBox "Opened File"
'.
'.
'.
xl.Quit
Set xl = Nothing

End Sub

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum