Link to home
Start Free TrialLog in
Avatar of Anne Troy
Anne TroyFlag for United States of America

asked on

VBA: Save as CSV, no prompts, close file. Excel 2007

I have scoured the web and can't find definitive code for this. They all have variables I don't know how to alter.

I simply want to save the XLS file to a CSV file right in the same folder, with the same name, and then close it. I don't want to be prompted about anything. I even know how to do that part, but not how to just save it. I'm not going to paste partial code because I don't know of any that is absolutely correct.

I don't need any error handling or anything. It's just for my personal use.

Thanks so much!
SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I just clicked on your profile and noticed your just about to reach the Genius level which I congratulate you in advance and most of all appreciate you humbleness from the way you asked you question which I salute and again congratulate you for.

Please do not hesitate to ask me for any help you may need in the Excel/VBA/VB6 I will be glad to assist.

I had personally stumbled on this issue not for saving but mainly to get rid of the Excel instance that was opened after the workbook was closed and could not get it to work and it took me lot of research and trial/errors to finally got it that you need to get rid of the application just about the workbook get finally kicked out.

Rgds/gowflow
Avatar of Anne Troy

ASKER

I have FINALLY got to this, so sorry! Code works GREAT. Not sure about the workbook event because it's always a different workbook that comes from a customer, and we don't want to distribute macro files to customers. Anyway... love it.

As for Genius, I don't really answer questions here anymore, though I did so lots and lots of hours per day a long time ago. :) Thanks!
good and glad we could help
gowflow
Avatar of Martin Gregar
Martin Gregar

Hello, I have some problem. I want to save xlsx to csv but I want ";" not "," in csv file. And I want to save csv in another folder. Could you help me with this? I am absolutely amateur in this problem. It is possible that VBA code will be always in xlsx file?