
04-15-2003, 01:00 PM
|
|
Newcomer
|
|
Join Date: Apr 2003
Posts: 18
|
|
I was head there but VBJoe had what I was looking for
Quote: Originally Posted by VBDude or if you want to be able to access the file name from any form (whether it's loaded or not), try something like this:
'in form1:
open app.path &"\filename.tmp" for output as #1
print #1, FILENAME 'this would be the "Example.xls"
close #1
'then to get the file name:
dim filename as string
open app.path & "\filename.tmp" for input as #1
line input #1, filename 'this variable now has the name of the file you want
close #1
Your above example was going to be my last hope so to speak, however I was concerned on keeping the whole program a simple container with the only inputs directed on Excel.
VBJoe had what I was looking for. A simple call routine. It works great!
Thanks go to all who help out newbies...
I was also looking at class modules vs standard modules but I havn't got a clue on how to figure them out. My thought was to write the filename to memory and not to a physical file. However, I knew it was there, what I could not figure out was how to access it.
Thanks for your ideas...
|
|