Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Is there any way to speed this up?

Hi

I've got a bit of code that scans through each cell in the first column
of a spreadsheet using the offset method looking for pagebreaks, and
inserting a new line and some text if it finds one. It takes about
20secs to do just 200 rows. I've set application.visible to false and
application.screenupdating to false. Does anyone know of a way i can
speed this process up?

Thanks

Keith

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 329
Default Is there any way to speed this up?

Hi Keith,

That depends on your code - which you haven't posted.

Cheers

--
macropod
[MVP - Microsoft Word]


"Keith74" wrote in message ups.com...
| Hi
|
| I've got a bit of code that scans through each cell in the first column
| of a spreadsheet using the offset method looking for pagebreaks, and
| inserting a new line and some text if it finds one. It takes about
| 20secs to do just 200 rows. I've set application.visible to false and
| application.screenupdating to false. Does anyone know of a way i can
| speed this process up?
|
| Thanks
|
| Keith
|


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Is there any way to speed this up?

Keith,
You can use the HPageBreaks/VPageBreaks collection to see where the occur.
Worksheets(1).HPageBreaks(1).Location.Address

NickHK

"Keith74" wrote in message
ups.com...
Hi

I've got a bit of code that scans through each cell in the first column
of a spreadsheet using the offset method looking for pagebreaks, and
inserting a new line and some text if it finds one. It takes about
20secs to do just 200 rows. I've set application.visible to false and
application.screenupdating to false. Does anyone know of a way i can
speed this process up?

Thanks

Keith



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Is there any way to speed this up?

Hi

Here it is

For intCount = 1 To intTotal

If Worksheets("Summary").Rows(intCount).PageBreak <
xlPageBreakNone _
And ActiveCell.Value < "" Then
Rows(intCount).Select
Selection.Insert Shift:=xlDown
End If

ActiveCell.Offset(1, 0).Select
Next

cheers

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Is there any way to speed this up?

removing the selecting will help

With Worksheets("Summary")

iRow = ActiveCell.Row
iCol = ActiveCell.Column

For intCount = 1 To intTotal

If .Rows(intCount).PageBreak < xlPageBreakNone _
And .Cells(iRow + i - 1, iCol).Value < "" Then

.Rows(intCount).Insert Shift:=xlDown

End If

Next


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"Keith74" wrote in message
oups.com...
Hi

Here it is

For intCount = 1 To intTotal

If Worksheets("Summary").Rows(intCount).PageBreak <
xlPageBreakNone _
And ActiveCell.Value < "" Then
Rows(intCount).Select
Selection.Insert Shift:=xlDown
End If

ActiveCell.Offset(1, 0).Select
Next

cheers





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
Can you speed UP drag speed? Ryan W Excel Discussion (Misc queries) 1 October 24th 05 06:09 PM
I need mor Speed!!!! MESTRELLA29 Excel Discussion (Misc queries) 0 February 11th 05 02:51 PM
Speed tjh Excel Programming 1 December 16th 04 05:49 PM
need for speed! Neil[_19_] Excel Programming 1 May 19th 04 10:25 PM
Speed? Stu[_31_] Excel Programming 11 October 18th 03 09:41 PM


All times are GMT +1. The time now is 01:06 PM.

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"