Ask Your Question
0

Macro takes 10 seconds to run [closed]

asked 2012-09-11 19:48:44 +0100

G2007 gravatar image

updated 2015-10-23 13:44:39 +0100

Alex Kemp gravatar image

Below is copy of macro. The 'invoice' macro takes 10 seconds to complete. The 'Save As' macro is done within a second or two. This is converted from excel sheet. If I record a macro in LibO to create the same invoice, it still takes 10 seconds to complete so I don't think language is problem. Any thoughts. Thanks

Rem # Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Invoice()
Rem #
Rem # Invoice Macro
Rem #

Rem #
  Sheets("Sheet2").Select
  Range("A1").Select
  Selection.Copy
  Sheets("Sheet1").Select
  Range("A1").Select
  ActiveSheet.Paste
  Sheets("Sheet2").Select
  Rows("1:1").Select
  Application.CutCopyMode = False
  Selection.Delete Shift:=xlUp
  Range("A1:A2").Select
  Selection.AutoFill Destination:=Range("A1:A3"), Type:=xlFillDefault
  Range("A1:A3").Select
  Sheets("Sheet1").Select
  Range("A1").Select
End Sub

Sub SaveAs()
  ThisFile = Range("A1").Value
  ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-23 13:44:50.786107

Comments

Please open a bug report for it with whiteboard status perf.

moggi gravatar imagemoggi ( 2012-09-15 12:50:07 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2013-02-24 21:23:34 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

(comment -> Answer for Resolution)

@moggi writes:

Please open a bug report for it with whiteboard status perf.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-09-11 19:48:44 +0100

Seen: 473 times

Last updated: Feb 24 '13