be warned my help is little.
I wrote a program to enforce file name formats, for mp3's so I wouln't
have to remove underscores and unix periods and crap. in it I did a
helluva lot of file manipulation.
I had to test a lot of file conditions before I made any changes with
the name command.
if the xls file is opened by your program, you should know. if it's
open by another program your SOL. Pick another name. Tack on an
integer or whatever.
to test if a function was performed
on error resume next
Err = 0
i = 0
open blah.xls 'or whatever you do to open
while Err <> 0 do
Err = 0
i = i + 1
open "blah" & i & ".xls
loop
on error goto 0
' hope this helps somewhat
Quote:
> I currently know how to write and save data to a Excel file using VB
code.
> The area that I'm having trouble with is this:
> I first what to see if the .xls file exists, if it does then check to
see if
> it's open, if it is then close it. If it doesn't exists then create
it.
> Any suggestions would be much appreciated.
> Thanks,
> Mike
Sent via Deja.com
http://www.deja.com/