Another SaveAs Question

C

chipshot

In the code below I cannot get the saveas that uses the variable driven
filename to save. It executes without error and the correct value is
shown in the message box and if I use the debugger the correct value is
in the strFilename variable but nothing is saved. However the hardcoded
filename saves fine. Is there anything I might be overlooking in terms
of application settings or anything I am overlooking? I have two
similar verions. It works in one but not the other.
 
D

Dave Peterson

Did you look in that Pricing Model folder for a file that has a name that
matches strfilename?

Your back-to-back .saveAs would leave test.xls as the activeworkbook.

If that doesn't work, you may want to post your actual code.
 
C

chipshot

I just put them back to back to show which one works and which one
doesn't. It does the same thing when the directory is empty. If I take
out the hard coded line it makes no differance.
 
G

Guest

from what I can see, if everything is fine, it should work. If it doesn't
work, something must not be fine. does the value of strfilename have the
extension ".xls"?
 
C

chipshot

I've done it with it there and without it. Thing is when it's hard coded
it will work with or without the .xls extension as well, it
automatically appends it. I'm thinking it really isn't a coding issue
but some other unknown quirk.
 

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

Top