LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   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 Pete,

Rob Boveys's addin is *very* frequently recommended by the conoscenti in
this group.

Given your problems, I would advocate running the CodeCleaner *first*.

Including download, you will just about have time to drink a coffee - which
might also assuage your nerves!

---
Regards,
Norman



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

I'll take a look at it - AFTER I get this thing working again, and AFTER I
take 74 backup copies when it does..! :-)

Pete



"Norman Jones" wrote:

Hi Peter,

You might first like to download Rob Boveys CodeCleaner addin which is
freely downloadable at:

http://www.appspro.com/Utilities/Utilities.htm

Run the dwnloaded Exe file to invoke an automatic installation routine.
Call
the CodeCleaner from the Tools menu.


---
Regards,
Norman



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

I'm recreating the workbook as we speak.

Hopefully copying and pasting the code won't carry the corruption over.

I'll let you know how I go on

Thanks again

Pete



"Norman Jones" wrote:

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












 
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 03:42 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"