Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy Sheet action very slow
Near the bottom part of the code (below), ie "SH.Copy", when running the
code and it reaches that line, the operation to do that takes an unusually long time. The status bar at that time reveals information as follows: Cell (Press Esc to cancel) and a very slow moving green progress bar. I don't understand why it should take about 30 secs or more to copy a sheet, especially when that sheet has hardly any data and no formulas! (The formula is ="GJ-" & TEXT(GenEntry!H2,"dd-mm-yy") & " for Inv# " &Y1&".txt") When I copy that sheet manually, the process is faster than a speeding bullet! Also, if I save the workbook as a 2003 version it runs MUCH faster! Is this just one of those miriad of version 2007 problems, or does there have to be some changes in the code to accommodate whatever Version 2007 has mucked up? Rob Sub mExportToMYOB() On Error GoTo Oops Dim WB As Workbook Dim SH As Worksheet Dim rng As Range Dim newFileName As String Set WB = Workbooks("Journal Maker.xlsm") Set SH = WB.Sheets("GenExportData") Set rng = SH.Range("V1") Dim drive As String Dim dir As String drive = "C" dir = "C:\Documents and Settings\Rob\Desktop" 'other stuff...... ChDrive drive ChDir dir newFileName = rng.Text SH.Copy Application.DisplayAlerts = False With ActiveWorkbook .SaveAs Filename:=newFileName, _ FileFormat:=xlText .Close End With |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 slow to copy entire sheet | Excel Discussion (Misc queries) | |||
protecting ceels to copy -paste action | Excel Worksheet Functions | |||
protecting ceels to copy -paste action | New Users to Excel | |||
protecting ceels to copy -paste action | Excel Discussion (Misc queries) | |||
Why is first font action v-e-r-y slow? | Excel Discussion (Misc queries) |