LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Macro creates additional datafiles when saving copies of workbook

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel creates multiple temp files when saving westbrom Excel Discussion (Misc queries) 7 September 25th 13 04:09 PM
saving macro from workbook to Personal Macro Workbook KrispyData Excel Discussion (Misc queries) 1 March 25th 10 05:52 PM
Saving a document creates a shortcut ManhattanRebel Excel Discussion (Misc queries) 8 January 29th 09 01:03 AM
Saving Macro to Personal Workbook Chris Excel Discussion (Misc queries) 1 November 8th 06 08:41 PM
Saving a workbook as PDF in Macro David McRitchie Excel Programming 1 June 23rd 04 09:49 PM


All times are GMT +1. The time now is 11:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"