open a file

  • Thread starter Thread starter jeff
  • Start date Start date
J

jeff

Hi,

If all you want to do is read "readme.txt"
try having your command button call this:

Sub OpenMyFile()
Open "C:\Readme.txt" For Input As #1
Line Input #1, A$
MsgBox "You read in " & A$
Close #1
End Sub

jeff
-----Original Message-----
as silly as this may seem...

all i want to do is open a text file, linked to
commandbutton1, stored in S:\readme.txt
 
cheerz for your help but none of these work!

I get the runtime error '52'

Bad filename or number....

and it highlights the Line "Line Input #0, A$" in yellow.

I dont understand why nor do i understand the syntax, do i need to manipulate it?

thanx again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top