Macros and save as

blakrapter

New Member
Joined
Oct 16, 2006
Messages
13
Hello everyone,

I am having trouble with a macro I am trying to build (the first time I've attempted to create a macro). I have an excel workbook that takes data and manipulates it into a usable format for two different servers I upload to. One server requires a CSV file and the other a txt file. I have the workbook setup such that I have a sheet for each file type.

Currently, I am manually saving the files that have to be uploaded. The way it works is after I paste the updated data in, excel does its thing, then I "save as" in the appropriate sheet to save it as the appropriate file type, save it and repeat for the other file that has to be uploaded.

I want to create a macro to do this, but i cannot get it to work. I think the problem is it changes file names half way through the macro... How can I work around this?

Thanks!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Can you post your current code?
 
Upvote 0
I can give it a shot, however, it will not contain the part of the code where it is failing. I am using the record function rather than coding it by hand, so when I am finished and press stop, it disappears. I cannot find it saved in any of the files (origional where it started, or the csv and txt file I created).

Would it be better to hand code it? My guess is yes it would be, but I have 0 experience in VB.

If there is a way I can capture the code, let me know and i'll post it.

Thanks!
 
Upvote 0

Forum statistics

Threads
1,214,872
Messages
6,122,026
Members
449,061
Latest member
TheRealJoaquin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top