Thread: Save "speed up"
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Save "speed up"

Hi Mike,

Well. The file location is in a network, with limited access (for me) so
that doesnt help much


Whilst it is frequently true that the quality of assistance bears a
proportional relationship to the ability and imagination of the
respondent -your bad luck in this case! - there is a similar relationship to
the sufficiency of proffered information.

Given the network restrictions, perhaps you should speak to your network
administrator.

In any event, I suspect that it is unlikely that your code has any bearing
on the save time issue.

---
Regards,
Norman



"Mike" wrote in message
...
Well. The file location is in a network, with limited access (for me) so
that
doesnt help much.


"Norman Jones" wrote:

Hi Mike,

Try clearing accumulated tmp files from your Temp directory:

Close Excel
Windows Start button| Run | %temp% | OK
Delete all files and folders.

---
Regards,
Norman



"Mike" wrote in message
...
Hi!

I have a workbook that includes a macro (size is 750 kb). When the user
opens the workbook a number is generated (+ 1). The workbook is saved
to a
temp location with the new number and the original workbook is saved
and
closed (also with the new number).

My question is: is it possible to speed up this (now it takes 20-30
sec).

The code:

'This code saves the original workbook with the new number:

If Me.Saved = False Then Me.Save

'This code saves the temp workbook:

FileSaveName = ActiveWorkbook.Path
FileSaveNameEnd = FileSaveName & "\Arkiv\"
varName = ActiveSheet.Name
varDir = FileSaveNameEnd
varYear = Format(Date, "yyyy")
varNr = ReportNumber
ActiveSheet.SaveAs Filename:=varDir & varName & varNr & varYear

Can i do something else to speed up the saving process?

Mike