Apologies for a (I think) very basic question. I know this has been answered many times in many places, but the solutions I've found are rather sophisticated, well beyond my understanding at this stage.
I am looking to save all csv files in a folder in xlsx format. I have a macro (in a workbook that is open) that does this fine for a file with known name & extension. I'd like to avoid just copying this command many times and changing the name.
The command I have is
my files are all in the format output#.csv (where # is just a number). There are no other csv files in the folder, so I don't have to worry about matching the textstring - just want to loop through all the csv files. The number of files in the folder varies, so if I can avoid using a for loop and setting a string like outputX.csv where I iterate on X that'd be nice, but if necessary can do that.![]()
Please Login or Register to view this content.
I'm very new to VBA and needing a quick solution to a problem, so I'm not looking for anything sophisticated, just the most straightforward way to create the loop, either through all files (I've seen things like Do While name <> "" but haven't managed to adapt to get this working - yet) or set the string based on an iterator that I can manually set each time if necessary. At the moment I'm looking for something I can understand rather than a faster/better way of doing things (I can get to that when I have some time to start learning this programming properly).
Thanks
Bookmarks