Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel slowness

I am trying to copy data from one spreadsheet to another. The code
loops through the first spreadsheet and when a new value is found (I
know it is new using the vlookup worksheet function), a form is shown
for the user to enter some new information (then new spreadsheet
requires more info than the old).

Everything works fine until around the 80th time the form is shown and
then everything slows to a crawl. In debug the bottleneck is the .find
method

With Workbooks(recent).Sheets("Styles").Range("A:A")
Set c = .Find(UCase(Fstyle), LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing And Fstyle < "" Then

What is really strange is that if I end the macro and just try a CTRL+F
to search the spreadsheet it takes forever (you can see excel searching
in the name box very slowly). Resaving or closing excel does nothing.
Someone the spreadsheet itself becomes slow. If I try the CTRL+F
before running the macro it works fine.

Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Excel slowness

When you are done with the form are you hiding it or unloading it? Perhaps
your loop is creating multiple instances of the form, which would eat up
memory & slow down your procedure.

"gloveman" wrote:

I am trying to copy data from one spreadsheet to another. The code
loops through the first spreadsheet and when a new value is found (I
know it is new using the vlookup worksheet function), a form is shown
for the user to enter some new information (then new spreadsheet
requires more info than the old).

Everything works fine until around the 80th time the form is shown and
then everything slows to a crawl. In debug the bottleneck is the .find
method

With Workbooks(recent).Sheets("Styles").Range("A:A")
Set c = .Find(UCase(Fstyle), LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing And Fstyle < "" Then

What is really strange is that if I end the macro and just try a CTRL+F
to search the spreadsheet it takes forever (you can see excel searching
in the name box very slowly). Resaving or closing excel does nothing.
Someone the spreadsheet itself becomes slow. If I try the CTRL+F
before running the macro it works fine.

Any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Excel slowness

Try to use MATCH instead of FIND ?

Example:

Worksheets("Styles").Select
data_ran = Range("A1:A15000") ' select your range
On Error Resume Next
irow = WorksheetFunction.Match(Fstyle, data_ran, 1)
If Not Len(Error) 0 Then

End If


"gloveman" wrote:

I am trying to copy data from one spreadsheet to another. The code
loops through the first spreadsheet and when a new value is found (I
know it is new using the vlookup worksheet function), a form is shown
for the user to enter some new information (then new spreadsheet
requires more info than the old).

Everything works fine until around the 80th time the form is shown and
then everything slows to a crawl. In debug the bottleneck is the .find
method

With Workbooks(recent).Sheets("Styles").Range("A:A")
Set c = .Find(UCase(Fstyle), LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing And Fstyle < "" Then

What is really strange is that if I end the macro and just try a CTRL+F
to search the spreadsheet it takes forever (you can see excel searching
in the name box very slowly). Resaving or closing excel does nothing.
Someone the spreadsheet itself becomes slow. If I try the CTRL+F
before running the macro it works fine.

Any ideas?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel slowness

I am unloading it each time, I tried hiding it, but I wanted the
initialize routine to kick off and couldn't get that to happen when
hiding.

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
Slowness in Opening Excel from document shortcut kb9jlo Excel Discussion (Misc queries) 2 April 17th 09 09:50 PM
Autofilter Slowness Dip Excel Discussion (Misc queries) 2 August 25th 08 12:16 AM
Is there a fix for the slowness in excel 2007? excelfrustrated Excel Discussion (Misc queries) 8 July 7th 08 05:08 PM
Slowness When Opening XLS File Tom Glasser Excel Discussion (Misc queries) 0 October 30th 07 08:52 PM
Excel 2003 Slowness problem in Windows XP Elton Seng Yan Thung Excel Discussion (Misc queries) 2 May 18th 05 04:55 AM


All times are GMT +1. The time now is 04:27 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"