Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Hanging on sheet close

I'm using the following code

With
Workbooks("BillDispositionDetail-r.html").Sheets("BillDispositionDetail-r")
.Range(.Cells(1, 1), .Cells(ReadyRows, 18)).Copy
End With

Workbooks("BD-Master.xls").Sheets("BDData").Cells(1, 1).PasteSpecial
Paste:=xlPasteValues

With Workbooks("BD-Master.xls").Sheets("BDData")
.Range(.Cells(3, 18), .Cells(ReadyRows, 18)).Value = "Ready"
End With

Workbooks("BillDispositionDetail-r.html").Close


When I run it on a small amount of sample data, approx a 150k file it works
fine. When I use production data, 6-7 mb files it hangs on the
workbooks.close

Above this I have Application.DisplayAlerts = False

I believe that it hangs because of the normal dialog saying you've placed a
large amount of data on the clipboard. Is there some way around this or do
I need to change my code so that it closes the source files after formatting
the tables?

Jesse


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Hanging on sheet close

Jesse,

You could try clearing the clipboard with:

Application.CutCopyMode = False

hth,

Doug

"Jesse" wrote in message
news:EJyzb.2767$d35.622@edtnps84...
I'm using the following code

With

Workbooks("BillDispositionDetail-r.html").Sheets("BillDispositionDetail-r")
.Range(.Cells(1, 1), .Cells(ReadyRows, 18)).Copy
End With

Workbooks("BD-Master.xls").Sheets("BDData").Cells(1, 1).PasteSpecial
Paste:=xlPasteValues

With Workbooks("BD-Master.xls").Sheets("BDData")
.Range(.Cells(3, 18), .Cells(ReadyRows, 18)).Value = "Ready"
End With

Workbooks("BillDispositionDetail-r.html").Close


When I run it on a small amount of sample data, approx a 150k file it

works
fine. When I use production data, 6-7 mb files it hangs on the
workbooks.close

Above this I have Application.DisplayAlerts = False

I believe that it hangs because of the normal dialog saying you've placed

a
large amount of data on the clipboard. Is there some way around this or

do
I need to change my code so that it closes the source files after

formatting
the tables?

Jesse




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Hanging on sheet close

This worked great Doug, thanks.

Jesse



"Doug Glancy" wrote in message
...
Jesse,

You could try clearing the clipboard with:

Application.CutCopyMode = False

hth,

Doug

"Jesse" wrote in message
news:EJyzb.2767$d35.622@edtnps84...
I'm using the following code

With


Workbooks("BillDispositionDetail-r.html").Sheets("BillDispositionDetail-r")
.Range(.Cells(1, 1), .Cells(ReadyRows, 18)).Copy
End With

Workbooks("BD-Master.xls").Sheets("BDData").Cells(1, 1).PasteSpecial
Paste:=xlPasteValues

With Workbooks("BD-Master.xls").Sheets("BDData")
.Range(.Cells(3, 18), .Cells(ReadyRows, 18)).Value = "Ready"
End With

Workbooks("BillDispositionDetail-r.html").Close


When I run it on a small amount of sample data, approx a 150k file it

works
fine. When I use production data, 6-7 mb files it hangs on the
workbooks.close

Above this I have Application.DisplayAlerts = False

I believe that it hangs because of the normal dialog saying you've

placed
a
large amount of data on the clipboard. Is there some way around this or

do
I need to change my code so that it closes the source files after

formatting
the tables?

Jesse






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
selection hanging selection hanging New Users to Excel 2 June 2nd 09 02:41 PM
Excel hanging... Jambo Excel Discussion (Misc queries) 1 May 30th 08 03:13 PM
Macro hanging up on 2nd use and later. Dave H Excel Discussion (Misc queries) 2 May 25th 06 01:57 PM
Hanging When saving to server Nick B Excel Discussion (Misc queries) 1 October 27th 05 07:16 PM
Can you use hanging indents in Excel? TPA59 Excel Discussion (Misc queries) 1 June 2nd 05 09:42 PM


All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"