Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to create a set of files named d1.csv, d2.csv, etc.
I have created a similar-named set of workbooks, named d1,d2... As the files are written, I want them to automatically overwrite the previous file in the receivubg directore, without giving me a warning When done, I want to delete the worksheets The code I've written drops me off into nothingness. Here is the code: CSVPath = "J:\My Documents\Bridge\Updates\" For i = 3 To 21 Sheets(i).Select Application.CutCopyMode = False Selection.Copy Set NewWkb = ActiveWorkbook ws1.Cells(200, 3).Value = j ws1.Cells(201, 3).Value = "d" + Cells(200, 3).Text CSVName = ws1.Cells(201, 3).Text NewWkb.SaveAs CSVPath & CSVName, xlCSV On Error Resume Next NewWkb.Close False Next For i = 3 To 21 Sheets(i).Delete Next I know, it's clumsy. I'd appreciate suggestions on how to improve any of it. Thanks Jim Berglund |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem creating formulas when exporting QuickBooks files to Excel | New Users to Excel | |||
Problem with creating Worksheets with Macros | Excel Programming | |||
Network Files creating temporary files | Excel Discussion (Misc queries) | |||
Formula for coinciding columns... | Excel Discussion (Misc queries) | |||
Creating PDF Files from Multiple Worksheets Using VBA | Excel Programming |