Auto filesaveas vba code

  • Thread starter Thread starter alanford
  • Start date Start date
A

alanford

Hi there guys,
I have tried all of the suggestions but non worked (maybe is because I
am a newby) but please please try and help me again.
the project is this:
1) Cell c3 contains a text that will act as the file name.
2) the code needs to use this text as file name and save it to a
directory c:\program files\shopping\recipes.
3) if the file exists then the user needs to be prompted to save or
rename in that directory.

Thank you again.

Alan
 
Hi Alan,
the project is this:
1) Cell c3 contains a text that will act as the file name.
2) the code needs to use this text as file name and save it to a
directory c:\program files\shopping\recipes.

This should do:

Workbooks("abcd.xls").SaveAs FileName:="program
files\shopping\recipes\" & Range("c2").Value & ".xls"
3) if the file exists then the user needs to be prompted to save or
rename in that directory.

This should work automatically unless you do not want
excell to hide that prompt.

Best

Markus
 
Markus
thanks for your tip. it works fine the only issue is that if the file
exists already I need to ask the user to either save it over or choose
another name, do you know what I should add?
 

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