Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to open a file

Status
Not open for further replies.

smayshar

Programmer
Aug 30, 2003
42
AU
hello, I have a Continuous Form that has a string fild which the user put in pathes(locations) of files that he wants to open on click
what will be the code to open the file ?
 
The actual code depends on what you want to do with the file when its opened. Do you want to read data from it, write data to it, do both (read/write) data, open the file in its native application (eg load a .doc file into Word) or what?

John
 
As John says, "opening" files when talking VBA has a very specific meaning.
What I think you mean is open a .doc file in word, .xls in excel, etc.
If that is the case, then take a look at faq705-1971 which gives you a function to do just that.

Cheers

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
thenks, John,Ben
regardless to the kind of files the user will input, I ansure it will be string of the location of the file,how do i open it the same as the operating system opens it?

 
BEN the link u sent was perfect
that exactly what I needed
Many thenks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top