PC Review


Reply
Thread Tools Rate Thread

2007 Macro's Painfully slow

 
 
Dennis
Guest
Posts: n/a
 
      2nd Mar 2008
I have 2 or 3 macros that I created in Excel 2003 that worked great....
When I upgraded to Excel 2007, the macros all slowed to a snails crawl....
I tried recreating them using Excel 2007, but no different.
I was wondering if there are security settings that need to be changed to
let the macros run faster....My macros run, just very very slowly.
 
Reply With Quote
 
 
 
 
JLatham
Guest
Posts: n/a
 
      2nd Mar 2008
I know this sounds like an odd question, but what CPU is in the machine
you're running 2007 on? If it's a multi-core CPU such as an AMD X2 or Intel
Core-Duo then the slowdown could be because of multi-threading issues in 2007
on multi-core CPUs.

One test, if you do have a multi-core CPU, would be to turn off
multi-threading in Excel and run the macros a few times to see if there's a
speed improvement. Here's the path to the setting:
[Office Button] | [Excel Options] | [Advanced]
Scroll down to the [Formulas] section and uncheck the "Enable Multi-threaded
calculation" setting.

This has the disadvantage of turning off multi-threading in Excel on your
computer for all workbooks. The problem(s) with multi-threading probably
don't affect all functions that may be used within the VBA code.

If turning off this feature improves performance, then one or more of your
macros may be using a function that is affected by the problem. I do have
some software code that you can wrap the offending process(es) in to
selectively turn multi-threading off and on to try to give you optimum
performance. If you decide this is the way to go, reply asking for the code
and I'll post it.

"Dennis" wrote:

> I have 2 or 3 macros that I created in Excel 2003 that worked great....
> When I upgraded to Excel 2007, the macros all slowed to a snails crawl....
> I tried recreating them using Excel 2007, but no different.
> I was wondering if there are security settings that need to be changed to
> let the macros run faster....My macros run, just very very slowly.

 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      2nd Mar 2008
I've found that macros take about twice as long, best case, in Excel 2007.
But then I've seen some macros, particularly ones that manipulate "shapes",
become almost unusably slow. I think this is the way Excel 2007 is and not
the result of some setting.

--
Jim
"Dennis" <(E-Mail Removed)> wrote in message
news:F1B7D6FC-7B3F-4346-8FE6-(E-Mail Removed)...
>I have 2 or 3 macros that I created in Excel 2003 that worked great....
> When I upgraded to Excel 2007, the macros all slowed to a snails crawl....
> I tried recreating them using Excel 2007, but no different.
> I was wondering if there are security settings that need to be changed to
> let the macros run faster....My macros run, just very very slowly.



 
Reply With Quote
 
Charles Williams
Guest
Posts: n/a
 
      3rd Mar 2008
Excel 2007 does run macros slower, particularly with shapes and charts.
One thing to try is to make sure that you have the Google Desktop Office
Addin and Google Desktop Search Office Addin unloaded: Office
button-->Excel Options-->Addins-->Com Addins-->Uncheck all the Google stuff

Charles
__________________________________________________
Outlines for my Sessions at the Australia Excel Users Group
http://www.decisionmodels.com/OZEUC.htm

"Dennis" <(E-Mail Removed)> wrote in message
news:F1B7D6FC-7B3F-4346-8FE6-(E-Mail Removed)...
>I have 2 or 3 macros that I created in Excel 2003 that worked great....
> When I upgraded to Excel 2007, the macros all slowed to a snails crawl....
> I tried recreating them using Excel 2007, but no different.
> I was wondering if there are security settings that need to be changed to
> let the macros run faster....My macros run, just very very slowly.



 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      3rd Mar 2008
ActiveWorkbook.Save
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Columns("C:C").Select
Selection.Delete Shift:=xlToLeft
Columns("D").Select
Selection.Delete Shift:=xlToLeft
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Columns("A:A").ColumnWidth = 25.43
Columns("B:B").ColumnWidth = 27.57
Columns("D").ColumnWidth = 30.14
Range("a1:a200").Select
Selection.Replace What:="-", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A2").Select
ActiveWorkbook.Save

Above is my macro....
My processor is a P$ running at 2.4GHz.
I turned Multithreading off, but it didn't make any difference.
I just ran this macro on a 38 row dataset, and it took 8 Minutes and 21
Seconds.
I am really at a loss.

"JLatham" wrote:

> I know this sounds like an odd question, but what CPU is in the machine
> you're running 2007 on? If it's a multi-core CPU such as an AMD X2 or Intel
> Core-Duo then the slowdown could be because of multi-threading issues in 2007
> on multi-core CPUs.
>
> One test, if you do have a multi-core CPU, would be to turn off
> multi-threading in Excel and run the macros a few times to see if there's a
> speed improvement. Here's the path to the setting:
> [Office Button] | [Excel Options] | [Advanced]
> Scroll down to the [Formulas] section and uncheck the "Enable Multi-threaded
> calculation" setting.
>
> This has the disadvantage of turning off multi-threading in Excel on your
> computer for all workbooks. The problem(s) with multi-threading probably
> don't affect all functions that may be used within the VBA code.
>
> If turning off this feature improves performance, then one or more of your
> macros may be using a function that is affected by the problem. I do have
> some software code that you can wrap the offending process(es) in to
> selectively turn multi-threading off and on to try to give you optimum
> performance. If you decide this is the way to go, reply asking for the code
> and I'll post it.
>
> "Dennis" wrote:
>
> > I have 2 or 3 macros that I created in Excel 2003 that worked great....
> > When I upgraded to Excel 2007, the macros all slowed to a snails crawl....
> > I tried recreating them using Excel 2007, but no different.
> > I was wondering if there are security settings that need to be changed to
> > let the macros run faster....My macros run, just very very slowly.

 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      3rd Mar 2008
Thanks for the help, what do you class shapes as? Fill colors?
That is the only thing, my dataset has other than ordinairy letter and
numbers.
I just did some timing, and it takes 1 minute and 49 seconds to delete 4
individual columns and set the width of 4 columns. Seems excessive to me.....
Faster to do it by hand.

"Jim Rech" wrote:

> I've found that macros take about twice as long, best case, in Excel 2007.
> But then I've seen some macros, particularly ones that manipulate "shapes",
> become almost unusably slow. I think this is the way Excel 2007 is and not
> the result of some setting.
>
> --
> Jim
> "Dennis" <(E-Mail Removed)> wrote in message
> news:F1B7D6FC-7B3F-4346-8FE6-(E-Mail Removed)...
> >I have 2 or 3 macros that I created in Excel 2003 that worked great....
> > When I upgraded to Excel 2007, the macros all slowed to a snails crawl....
> > I tried recreating them using Excel 2007, but no different.
> > I was wondering if there are security settings that need to be changed to
> > let the macros run faster....My macros run, just very very slowly.

>
>
>

 
Reply With Quote
 
paul.robinson@it-tallaght.ie
Guest
Posts: n/a
 
      3rd Mar 2008
Hi
Try sprinkling your code with the line

DoEvents

It speeded up some Excel charting for me in 2007 (from a situation
where the chart would simply not update without it). I think anything
happening to the GUI is very slow in 2007, so deleting columns would
be a problem??
Does anyone not dislike Vista and Excel 2007???
regards
Paul

On Mar 3, 8:28*am, Dennis <Den...@discussions.microsoft.com> wrote:
> Thanks for the help, what do you class shapes as? *Fill colors?
> That is the only thing, my dataset has other than ordinairy letter and
> numbers.
> I just did some timing, and it takes 1 minute and 49 seconds to delete 4
> individual columns and set the width of 4 columns. *Seems excessive to me.....
> Faster to do it by hand.
>
>
>
> "Jim Rech" wrote:
> > I've found that macros take about twice as long, best case, in Excel 2007.
> > But then I've seen some macros, particularly ones that manipulate "shapes",
> > become almost unusably slow. *I think this is the way Excel 2007 is and not
> > the result of some setting.

>
> > --
> > Jim
> > "Dennis" <Den...@discussions.microsoft.com> wrote in message
> >news:F1B7D6FC-7B3F-4346-8FE6-(E-Mail Removed)...
> > >I have 2 or 3 macros that I created in Excel 2003 that worked great....
> > > When I upgraded to Excel 2007, the macros all slowed to a snails crawl.....
> > > I tried recreating them using Excel 2007, but no different.
> > > I was wondering if there are security settings that need to be changedto
> > > let the macros run faster....My macros run, just very very slowly.- Hide quoted text -

>
> - Show quoted text -


 
Reply With Quote
 
xlrotor
Guest
Posts: n/a
 
      3rd Mar 2008
Have you tried
Application.ScreenUpdating = False
and setting excel Calculation to Manual
to see if these make any difference?

Brian Murphy
 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      3rd Mar 2008
"Shapes" is the collective programming "object" for pictures, charts,
rectangles, etc. Sounds like you don't have any.

Whenever something is slower by macro than manually you have a problem.
Obviously something is amiss and you'd think there would be a solution. I
couldn't venture a guess what it is though without seeing the problem first
hand and playing around with it.

--
Jim
"Dennis" <(E-Mail Removed)> wrote in message
news8F61F99-FE5B-49AE-8FCD-(E-Mail Removed)...
| Thanks for the help, what do you class shapes as? Fill colors?
| That is the only thing, my dataset has other than ordinairy letter and
| numbers.
| I just did some timing, and it takes 1 minute and 49 seconds to delete 4
| individual columns and set the width of 4 columns. Seems excessive to
me.....
| Faster to do it by hand.
|
| "Jim Rech" wrote:
|
| > I've found that macros take about twice as long, best case, in Excel
2007.
| > But then I've seen some macros, particularly ones that manipulate
"shapes",
| > become almost unusably slow. I think this is the way Excel 2007 is and
not
| > the result of some setting.
| >
| > --
| > Jim
| > "Dennis" <(E-Mail Removed)> wrote in message
| > news:F1B7D6FC-7B3F-4346-8FE6-(E-Mail Removed)...
| > >I have 2 or 3 macros that I created in Excel 2003 that worked great....
| > > When I upgraded to Excel 2007, the macros all slowed to a snails
crawl....
| > > I tried recreating them using Excel 2007, but no different.
| > > I was wondering if there are security settings that need to be changed
to
| > > let the macros run faster....My macros run, just very very slowly.
| >
| >
| >


 
Reply With Quote
 
Dennis
Guest
Posts: n/a
 
      5th Mar 2008
And now for the rest of the story......
The task I am trying to complete is:
1. My distant Head Office Publishes data on our private website.
2. I copy and paste one of the reports into Excel to manipulate the data
before placing it into my own database.

Given the answers that you have all provided, I got to thinking that maybe
the data that I am scraping from the Website is full of "stuff" that Excel
doesn't like. I.E. HTML code?
I downloaded the data to NOTEPAD, and then with a few quick "replace" steps,
was able to make the data pure text, and comma delimited. This data moves
quickly to my Access Database, so problem solved.... Thanks again.

PS. Once I had my data as pure text, I did place it back into Excel, just
as a test, and discovered that Excel is very slow at "Maximizing the width of
Columns". and "Deleting entire Columns", so should avoid those features in a
Macro. The "Find and Replace" function worked very quickly once the data had
been purified in NOTEPAD.

Thanks Everyone for your Help.

"Dennis" wrote:

> I have 2 or 3 macros that I created in Excel 2003 that worked great....
> When I upgraded to Excel 2007, the macros all slowed to a snails crawl....
> I tried recreating them using Excel 2007, but no different.
> I was wondering if there are security settings that need to be changed to
> let the macros run faster....My macros run, just very very slowly.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 painfully slow. smithkl42@gmail.com Microsoft Excel Discussion 4 24th Mar 2011 05:53 PM
Macro Running Painfully Slow! bigV Microsoft Excel Misc 5 31st May 2008 12:41 AM
Why is Outlook 2007 so painfully slow? Serge Skysi Microsoft Outlook Discussion 2 26th Oct 2007 06:54 PM
Excel 2007 painfully slow to open files Wowbagger Microsoft Excel New Users 3 14th Jun 2007 03:19 PM
Office Outlook 2007 PAINFULLY SLOW! =?Utf-8?B?Q2hhZA==?= Microsoft Outlook Discussion 5 20th Jan 2007 08:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:10 PM.