Hi All;
I have a small problem with exporting a specific sheet to a csv file. While the sheet exports correctly, the hosting file changes name and sets itself to a csv file which causes a lot of problems.
I recorded a macro in an effort to get some starter code, but I don't think it understands specifically what to do.
On a sheet called "Menu" the macro is pulling variables in specific text boxes. The csv file is correctly saving to that location, so there isn't an issue there. What I think is going wrong is the ActiveWorkbook.SaveAs section of code. how can I change that the the specific sheet called "data"?
Thanks,
Mike
I have a small problem with exporting a specific sheet to a csv file. While the sheet exports correctly, the hosting file changes name and sets itself to a csv file which causes a lot of problems.
I recorded a macro in an effort to get some starter code, but I don't think it understands specifically what to do.
On a sheet called "Menu" the macro is pulling variables in specific text boxes. The csv file is correctly saving to that location, so there isn't an issue there. What I think is going wrong is the ActiveWorkbook.SaveAs section of code. how can I change that the the specific sheet called "data"?
Code:
file = Worksheets("Menu").file_name_txt_box
folder = Worksheets("Menu").export_location_text_box
export_data = ActiveWorkbook.Sheets("data").Select
ChDir folder
ActiveWorkbook.SaveAs file, xlCSV, CreateBackup = False
Thanks,
Mike