Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Macro creates additional datafiles when saving copies of workbook

Hi Peter,

Immediately before the line:

ActiveWorkbook.SaveAs Filename:=TestFolderName ...


paste the diagnostic code:

With testdatacell
MsgBox "testdatacell address = " & .Address(0, 0, , 1) _
& vbTab & "Value = " & .Value
End With

Then see if testdatacell is what you expect it to be in terms of location
and value.


---
Regards,
Norman



"Peter Rooney" wrote in message
...
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

& Year & "-" & WeekNumber
& _
" - SOFT Report - " & TestDataCell.Value & ".xls", _
FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Macro creates additional datafiles when saving copies of workb

Morning, Norman!

All the values are correct - the SaveAs files are created with exactly the
correct filenames, in the correct folder, based on the values in the range.
The problem is that the additional files are creared as well (also in the
correct folder). There is one erroneous file created for each valid one, so
it must be something that's happening during the save process.

Any more thoughts?

Pete

"Norman Jones" wrote:

Hi Peter,

Immediately before the line:

ActiveWorkbook.SaveAs Filename:=TestFolderName ...


paste the diagnostic code:

With testdatacell
MsgBox "testdatacell address = " & .Address(0, 0, , 1) _
& vbTab & "Value = " & .Value
End With

Then see if testdatacell is what you expect it to be in terms of location
and value.


---
Regards,
Norman



"Peter Rooney" wrote in message
...
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

& Year & "-" & WeekNumber
& _
" - SOFT Report - " & TestDataCell.Value & ".xls", _
FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Macro creates additional datafiles when saving copies of workb

Hi Peter,

What is the code for the

DefineDatabase
YearWeekResourceName


routines?

---
Regards,
Norman



"Peter Rooney" wrote in message
...
Morning, Norman!

All the values are correct - the SaveAs files are created with exactly the
correct filenames, in the correct folder, based on the values in the
range.
The problem is that the additional files are creared as well (also in the
correct folder). There is one erroneous file created for each valid one,
so
it must be something that's happening during the save process.

Any more thoughts?

Pete

"Norman Jones" wrote:

Hi Peter,

Immediately before the line:

ActiveWorkbook.SaveAs Filename:=TestFolderName ...


paste the diagnostic code:

With testdatacell
MsgBox "testdatacell address = " & .Address(0, 0, , 1) _
& vbTab & "Value = " & .Value
End With

Then see if testdatacell is what you expect it to be in terms of location
and value.


---
Regards,
Norman



"Peter Rooney" wrote in message
...
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

& Year & "-" & WeekNumber
& _
" - SOFT Report - " & TestDataCell.Value & ".xls", _
FileFormat:=xlExcel9795, Password:="", WriteResPassword:="",
_
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Macro creates additional datafiles when saving copies of workb

Norman,

Here it is, although I've been experiencing application errors all morning
with the workbook in question. Do you think the fact that the workbook's
corrupted in some way might lead to the erroneous file being saved at the
same time as the proper one?

Pete


Sub DefineDatabase()
Application.ScreenUpdating = False
Set DBSheet = Worksheets("Database")
Set DBStart = DBSheet.Range("DatabaseStart")
Set DBCR = DBStart.CurrentRegion

If DBCR.Rows.Count 1 Then
DBCR.Name = "Database"
DBStart.Offset(1, 0).Resize(DBCR.Rows.Count - 1,
DBCR.Columns.Count).Name = "Data"
DBStart.Offset(1, 0).Resize(DBCR.Rows.Count - 1, 1).Name =
"PrefixColumn"
DBStart.Offset(1, 7).Resize(DBCR.Rows.Count - 1, 1).Name =
"CategoryColumn"
DBStart.Offset(1, 9).Resize(DBCR.Rows.Count - 1, 1).Name =
"GroupColumn"
DatabaseSize = DBCR.Rows.Count - 1

'-----------------------------------------------------------------------------------------
'You need this in order for the validation routines to work correctly!
'You also need to do it if you want to set up a scrollarea
FirstCellAddress = DBStart.Offset(1, 0).Address
FinalCellAddress = DBStart.Offset(DBCR.Rows.Count - 1,
DBCR.Columns.Count - 1).Address
FirstDBRow = DBStart.Offset(1, 0).Row
FirstDBColumn = DBStart.Offset(1, 0).Column
FinalDBRow = DBStart.Offset(DBCR.Rows.Count - 1, DBCR.Columns.Count
- 1).Row
FinalDBColumn = DBStart.Offset(DBCR.Rows.Count - 1,
DBCR.Columns.Count - 1).Column

'-----------------------------------------------------------------------------------------
Else 'set up single row "Data", "PrefixColumn", "CategoryColumn" and
"GroupColumn" ranges
DBStart.Offset(1, 0).Resize(1, DBCR.Columns.Count).Name = "Data"
DBStart.Offset(1, 0).Resize(1, 1).Name = "PrefixColumn"
DBStart.Offset(1, 7).Resize(1, 1).Name = "CategoryColumn"
DBStart.Offset(1, 9).Resize(1, 1).Name = "GroupColumn"
DatabaseSize = 0
End If
'MsgBox (DBFormatCallLocator & " - There is/are " & DatabaseSize & "
row(s) in this database" & vbCrLf & vbCrLf & _
"First Row: " & FirstDBRow & vbCrLf & _
"Final Row: " & FinalDBRow & vbCrLf & _
"First Column: " & FirstDBColumn & vbCrLf & _
"Final Column: " & FinalDBColumn)

'CellsToAllow = FirstCellAddress & ":" & FinalCellAddress
'MsgBox (CellsToAllow)
'DBSheet.ScrollArea = CellsToAllow
End Sub

Sub YearWeekResourceName()
Set WeekNumber = DBSheet.Range("WeekNumber")
Set Year = DBSheet.Range("Year")
Set ResourceName = DBSheet.Range("ResourceName")

End Sub




"Norman Jones" wrote:

Hi Peter,

What is the code for the

DefineDatabase
YearWeekResourceName


routines?

---
Regards,
Norman



"Peter Rooney" wrote in message
...
Morning, Norman!

All the values are correct - the SaveAs files are created with exactly the
correct filenames, in the correct folder, based on the values in the
range.
The problem is that the additional files are creared as well (also in the
correct folder). There is one erroneous file created for each valid one,
so
it must be something that's happening during the save process.

Any more thoughts?

Pete

"Norman Jones" wrote:

Hi Peter,

Immediately before the line:

ActiveWorkbook.SaveAs Filename:=TestFolderName ...

paste the diagnostic code:

With testdatacell
MsgBox "testdatacell address = " & .Address(0, 0, , 1) _
& vbTab & "Value = " & .Value
End With

Then see if testdatacell is what you expect it to be in terms of location
and value.


---
Regards,
Norman



"Peter Rooney" wrote in message
...
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
& Year & "-" & WeekNumber
& _
" - SOFT Report - " & TestDataCell.Value & ".xls", _
FileFormat:=xlExcel9795, Password:="", WriteResPassword:="",
_
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Macro creates additional datafiles when saving copies of workb

Hi Peter,

I've been experiencing application errors all morning
with the workbook in question.


I think that I would try to recreate your workbook.

Do you think the fact that the workbook's
corrupted in some way might lead to the erroneous file being saved at the
same time as the proper one?


Corrupt workbooks can cause strange phenomenons. It would not surprise me if
your reported:

filename made up of 8 random alphanumeric characters.


was caused by corruption

When Excel saves a file it produces an intermediate, temporary copy with a
name such as you describe. It seems possible that this temporary copy is
not being deleted.


---
Regards,
Norman



"Peter Rooney" wrote in message
...
Norman,

Here it is, although I've been experiencing application errors all morning
with the workbook in question. Do you think the fact that the workbook's
corrupted in some way might lead to the erroneous file being saved at the
same time as the proper one?

Pete


Sub DefineDatabase()
Application.ScreenUpdating = False
Set DBSheet = Worksheets("Database")
Set DBStart = DBSheet.Range("DatabaseStart")
Set DBCR = DBStart.CurrentRegion

If DBCR.Rows.Count 1 Then
DBCR.Name = "Database"
DBStart.Offset(1, 0).Resize(DBCR.Rows.Count - 1,
DBCR.Columns.Count).Name = "Data"
DBStart.Offset(1, 0).Resize(DBCR.Rows.Count - 1, 1).Name =
"PrefixColumn"
DBStart.Offset(1, 7).Resize(DBCR.Rows.Count - 1, 1).Name =
"CategoryColumn"
DBStart.Offset(1, 9).Resize(DBCR.Rows.Count - 1, 1).Name =
"GroupColumn"
DatabaseSize = DBCR.Rows.Count - 1

'-----------------------------------------------------------------------------------------
'You need this in order for the validation routines to work
correctly!
'You also need to do it if you want to set up a scrollarea
FirstCellAddress = DBStart.Offset(1, 0).Address
FinalCellAddress = DBStart.Offset(DBCR.Rows.Count - 1,
DBCR.Columns.Count - 1).Address
FirstDBRow = DBStart.Offset(1, 0).Row
FirstDBColumn = DBStart.Offset(1, 0).Column
FinalDBRow = DBStart.Offset(DBCR.Rows.Count - 1, DBCR.Columns.Count
- 1).Row
FinalDBColumn = DBStart.Offset(DBCR.Rows.Count - 1,
DBCR.Columns.Count - 1).Column

'-----------------------------------------------------------------------------------------
Else 'set up single row "Data", "PrefixColumn", "CategoryColumn" and
"GroupColumn" ranges
DBStart.Offset(1, 0).Resize(1, DBCR.Columns.Count).Name = "Data"
DBStart.Offset(1, 0).Resize(1, 1).Name = "PrefixColumn"
DBStart.Offset(1, 7).Resize(1, 1).Name = "CategoryColumn"
DBStart.Offset(1, 9).Resize(1, 1).Name = "GroupColumn"
DatabaseSize = 0
End If
'MsgBox (DBFormatCallLocator & " - There is/are " & DatabaseSize & "
row(s) in this database" & vbCrLf & vbCrLf & _
"First Row: " & FirstDBRow & vbCrLf & _
"Final Row: " & FinalDBRow & vbCrLf & _
"First Column: " & FirstDBColumn & vbCrLf & _
"Final Column: " & FinalDBColumn)

'CellsToAllow = FirstCellAddress & ":" & FinalCellAddress
'MsgBox (CellsToAllow)
'DBSheet.ScrollArea = CellsToAllow
End Sub

Sub YearWeekResourceName()
Set WeekNumber = DBSheet.Range("WeekNumber")
Set Year = DBSheet.Range("Year")
Set ResourceName = DBSheet.Range("ResourceName")

End Sub




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro creates additional datafiles when saving copies of workbook

When excel saves the file, it saves it as a temporary file with a funny name (8
characters--no extension).

If the save is successful, xl will delete the original (or rename it to its
backup name (like "backup of book1.xlk)) and if that's successful, xl will
rename the funny named file to the original's name.

Common things that get blamed for interruptions to this process are antivirus
software poking its head in or network errors--either permissions or physical
problems.

Maybe temporarily disabling the antivirus software would be the easier thing to
test.

Peter Rooney wrote:

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


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Macro creates additional datafiles when saving copies of workb

Hi, Dave,

I finally tracked down the problem, and, believe it or not, the problem was
solved when I changed the filetype in the SaveAs command from XL9795 to
XLNormal !
It seems I was somehow saving the workbooks AS the folder, instead of INTO
it, but now it's resolved. I guess it's one of those "I don't know why it
does that, but as long as it does, I'll leave it" things!

Thanks for your advice, I'll bear it in mind for future reference.

Regards

Pete


"Dave Peterson" wrote:

When excel saves the file, it saves it as a temporary file with a funny name (8
characters--no extension).

If the save is successful, xl will delete the original (or rename it to its
backup name (like "backup of book1.xlk)) and if that's successful, xl will
rename the funny named file to the original's name.

Common things that get blamed for interruptions to this process are antivirus
software poking its head in or network errors--either permissions or physical
problems.

Maybe temporarily disabling the antivirus software would be the easier thing to
test.

Peter Rooney wrote:

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


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro creates additional datafiles when saving copies of workbook


Hi, I've been having similar problems with a workbook on a network, som
wb's create the temp files some do not, i have been to most of th
machines and turned of the "keep change history" hoping that this cure
the problem so you could try that!

HTH

Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=39452

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 325
Default Macro creates additional datafiles when saving copies of workb

Hi, Simon,

I finally tracked down the problem, and, believe it or not, the problem was
solved when I changed the filetype from XL9795 to XLNormal!
It seems I was somehow saving the workbooks AS the folder, instead of INTO
it, but now it's resolved. I guess it's one of those "I don't know why it
does that, but as long as it does, I'll leave it" things!

Thanks for your tip, I'll bear it in mind for future reference.

Regards

Pete

"Simon Lloyd" wrote:


Hi, I've been having similar problems with a workbook on a network, some
wb's create the temp files some do not, i have been to most of the
machines and turned of the "keep change history" hoping that this cures
the problem so you could try that!

HTH

Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=394523




Reply
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:29 PM.

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"