Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Good morning, all!
I am using a simple loop to create test data workbooks. There is a 5X1 range "DropDownTeams" which is referred to as "TestDataCell" - the cells contain ELS1, ELS2...ELS5. My macro successfully creates the following workbooks: D:\Pete's Operations\Personal\Test\SOFT Report - 0530 - ELS1.xls D:\Pete's Operations\Personal\Test\SOFT Report - 0530 - ELS2.xls D:\Pete's Operations\Personal\Test\SOFT Report - 0530 - ELS3.xls D:\Pete's Operations\Personal\Test\SOFT Report - 0530 - ELS4.xls D:\Pete's Operations\Personal\Test\SOFT Report - 0530 - ELS5.xls the "0530" being the contents of two additional variables generated by the macro YearWeekResourceName. However, I ALSO get five additional files created, the same size as the original workbook, with no file extension and a filename made up of 8 random alphanumeric characters. Can anyone suggest why these files are being created? Are they temp files, and, if this is the case, why aren't they being deleted? Thanks in advance Pete Sub SetTestFolderName() TestFolderName = "D:\Pete's operations\Personal\Test\" End Sub Sub TestDataTeam() For Each TestDataCell In Sheets("DropDownLists").Range("DropDownTeams") Sheets("Database").Range("HeaderRemarks").Offset(1 , 0).Value = TestDataCell.Value Sheets("Database").Range("HeaderSubTeam").Offset(1 , 0).Value = "" SaveTestData Next End Sub Sub SaveTestData() SetTestFolderName DefineDatabase YearWeekResourceName 'Application.DisplayAlerts = False ActiveWorkbook.SaveAs Filename:=TestFolderName & Year & "-" & WeekNumber & _ " - SOFT Report - " & TestDataCell.Value & ".xls", _ FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel creates multiple temp files when saving | Excel Discussion (Misc queries) | |||
saving macro from workbook to Personal Macro Workbook | Excel Discussion (Misc queries) | |||
Saving a document creates a shortcut | Excel Discussion (Misc queries) | |||
Saving Macro to Personal Workbook | Excel Discussion (Misc queries) | |||
Saving a workbook as PDF in Macro | Excel Programming |