PC Review


Reply
Thread Tools Rate Thread

2007 Merge cells taking forever

 
 
J Streger
Guest
Posts: n/a
 
      11th Jan 2009
It seems that every time I try to merge cells via VBA, it takes forever. Code
that ran in 1 second in 2003 is taking over 10 seconds in 2007, and Excel is
stating it is Not Responsive so even the status bar is not updating. I tried
to pull all of the merging out of my loop and do it in one line, thinking
that this would be faster, but alas it seems the merging time is proportonal
to the amount of sections I'm merging. Anyone else have this issue and know
how to fix?

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003

 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      11th Jan 2009
See posting below. Microsoft is look for sample of macros that is running
slower on 2007 than 2003.

http://www.microsoft.com/office/comm...0-1a40da311c6d

"J Streger" wrote:

> It seems that every time I try to merge cells via VBA, it takes forever. Code
> that ran in 1 second in 2003 is taking over 10 seconds in 2007, and Excel is
> stating it is Not Responsive so even the status bar is not updating. I tried
> to pull all of the merging out of my loop and do it in one line, thinking
> that this would be faster, but alas it seems the merging time is proportonal
> to the amount of sections I'm merging. Anyone else have this issue and know
> how to fix?
>
> --
> *********************
> J Streger
> MS Office Master 2000 ed.
> MS Project White Belt 2003
>
> User of MS Office 2003
>

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      11th Jan 2009
Just curiosity, is calculation dis/enabled during the process

Regards,
Peter T

"J Streger" <(E-Mail Removed)> wrote in message
news:2802ACDD-19FB-4B41-A48D-(E-Mail Removed)...
> It seems that every time I try to merge cells via VBA, it takes forever.
> Code
> that ran in 1 second in 2003 is taking over 10 seconds in 2007, and Excel
> is
> stating it is Not Responsive so even the status bar is not updating. I
> tried
> to pull all of the merging out of my loop and do it in one line, thinking
> that this would be faster, but alas it seems the merging time is
> proportonal
> to the amount of sections I'm merging. Anyone else have this issue and
> know
> how to fix?
>
> --
> *********************
> J Streger
> MS Office Master 2000 ed.
> MS Project White Belt 2003
>
> User of MS Office 2003
>



 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Jan 2009
Can you post your code so we can test it on different systems to see if it
is universal or operating system dependent? I'm using Vista myself, but I
know others are still using XP, 2000, etc. Also, which operating system are
you using?

--
Rick (MVP - Excel)


"J Streger" <(E-Mail Removed)> wrote in message
news:2802ACDD-19FB-4B41-A48D-(E-Mail Removed)...
> It seems that every time I try to merge cells via VBA, it takes forever.
> Code
> that ran in 1 second in 2003 is taking over 10 seconds in 2007, and Excel
> is
> stating it is Not Responsive so even the status bar is not updating. I
> tried
> to pull all of the merging out of my loop and do it in one line, thinking
> that this would be faster, but alas it seems the merging time is
> proportonal
> to the amount of sections I'm merging. Anyone else have this issue and
> know
> how to fix?
>
> --
> *********************
> J Streger
> MS Office Master 2000 ed.
> MS Project White Belt 2003
>
> User of MS Office 2003
>


 
Reply With Quote
 
J Streger
Guest
Posts: n/a
 
      11th Jan 2009
It is turned off. I run this method at the start of every entry point:

Public Sub ScreenUpdating(Optional bEnable As Boolean = True)

Application.ScreenUpdating = bEnable
Application.Calculation = IIf(bEnable, xlCalculationAutomatic,
xlCalculationManual)
Application.Interactive = bEnable
Application.EnableEvents = bEnable
ThisWorkbook.Running = Not bEnable

End Sub 'ScreenUpdating


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003



"Peter T" wrote:

> Just curiosity, is calculation dis/enabled during the process
>
> Regards,
> Peter T
>
> "J Streger" <(E-Mail Removed)> wrote in message
> news:2802ACDD-19FB-4B41-A48D-(E-Mail Removed)...
> > It seems that every time I try to merge cells via VBA, it takes forever.
> > Code
> > that ran in 1 second in 2003 is taking over 10 seconds in 2007, and Excel
> > is
> > stating it is Not Responsive so even the status bar is not updating. I
> > tried
> > to pull all of the merging out of my loop and do it in one line, thinking
> > that this would be faster, but alas it seems the merging time is
> > proportonal
> > to the amount of sections I'm merging. Anyone else have this issue and
> > know
> > how to fix?
> >
> > --
> > *********************
> > J Streger
> > MS Office Master 2000 ed.
> > MS Project White Belt 2003
> >
> > User of MS Office 2003
> >

>
>
>

 
Reply With Quote
 
J Streger
Guest
Posts: n/a
 
      11th Jan 2009
Thanks. I guess I will submit my code to them. I really want this issue fixed.

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003



"Joel" wrote:

> See posting below. Microsoft is look for sample of macros that is running
> slower on 2007 than 2003.
>
> http://www.microsoft.com/office/comm...0-1a40da311c6d
>
> "J Streger" wrote:
>
> > It seems that every time I try to merge cells via VBA, it takes forever. Code
> > that ran in 1 second in 2003 is taking over 10 seconds in 2007, and Excel is
> > stating it is Not Responsive so even the status bar is not updating. I tried
> > to pull all of the merging out of my loop and do it in one line, thinking
> > that this would be faster, but alas it seems the merging time is proportonal
> > to the amount of sections I'm merging. Anyone else have this issue and know
> > how to fix?
> >
> > --
> > *********************
> > J Streger
> > MS Office Master 2000 ed.
> > MS Project White Belt 2003
> >
> > User of MS Office 2003
> >

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      11th Jan 2009
Thanks. I forgot to ask last time but are you using Vista.

For your purposes you shouldn't need to disable calculation unless anything
you are doing triggers or requires a recalc. Typically if merely merging
cells that's not the case. Though If you are doing very many merges you
might want to disable screenupdating.

Regards,
Peter T

"J Streger" <(E-Mail Removed)> wrote in message
news:32132301-D672-4373-99B3-(E-Mail Removed)...
> It is turned off. I run this method at the start of every entry point:
>
> Public Sub ScreenUpdating(Optional bEnable As Boolean = True)
>
> Application.ScreenUpdating = bEnable
> Application.Calculation = IIf(bEnable, xlCalculationAutomatic,
> xlCalculationManual)
> Application.Interactive = bEnable
> Application.EnableEvents = bEnable
> ThisWorkbook.Running = Not bEnable
>
> End Sub 'ScreenUpdating
>
>
> --
> *********************
> J Streger
> MS Office Master 2000 ed.
> MS Project White Belt 2003
>
> User of MS Office 2003
>
>
>
> "Peter T" wrote:
>
>> Just curiosity, is calculation dis/enabled during the process
>>
>> Regards,
>> Peter T
>>
>> "J Streger" <(E-Mail Removed)> wrote in message
>> news:2802ACDD-19FB-4B41-A48D-(E-Mail Removed)...
>> > It seems that every time I try to merge cells via VBA, it takes
>> > forever.
>> > Code
>> > that ran in 1 second in 2003 is taking over 10 seconds in 2007, and
>> > Excel
>> > is
>> > stating it is Not Responsive so even the status bar is not updating. I
>> > tried
>> > to pull all of the merging out of my loop and do it in one line,
>> > thinking
>> > that this would be faster, but alas it seems the merging time is
>> > proportonal
>> > to the amount of sections I'm merging. Anyone else have this issue and
>> > know
>> > how to fix?
>> >
>> > --
>> > *********************
>> > J Streger
>> > MS Office Master 2000 ed.
>> > MS Project White Belt 2003
>> >
>> > User of MS Office 2003
>> >

>>
>>
>>



 
Reply With Quote
 
J Streger
Guest
Posts: n/a
 
      27th Jan 2009
I actually have determined what the slow down was.

I did test this on both Excel 2003 on a vista machine, and Excel 2007 on
both a Vista and an XP machine. It is definitely a problem with 2007.

I can tell you that this block of code:

With rngMergeInfo
.Merge
.Font.Italic = True
.Font.Size = 10
.VerticalAlignment = xlCenter
End With

took 13 seconds to process. But what I failed to mention is that the sheet
has a lot of small .png pictures. They are almost all hidden and I unhide
them when needed. Now in 2003 the code had no problem, but there must be a
major difference with how 2007 works with hidden pictures as when I deleted
them all and ran the code, there was no slowdown.

Now I positioned the pictures with their left in the right spot so that I
wouldn't have to set the left property programmatically. So I'm hoping if I
move the pictures to a part of the sheet that won't have cells merged, that I
won't have the slowdown.

Any thoughts on how Excel handles the pictures differently?


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003

User of MS Office 2003



"Rick Rothstein" wrote:

> Can you post your code so we can test it on different systems to see if it
> is universal or operating system dependent? I'm using Vista myself, but I
> know others are still using XP, 2000, etc. Also, which operating system are
> you using?
>
> --
> Rick (MVP - Excel)
>
>
> "J Streger" <(E-Mail Removed)> wrote in message
> news:2802ACDD-19FB-4B41-A48D-(E-Mail Removed)...
> > It seems that every time I try to merge cells via VBA, it takes forever.
> > Code
> > that ran in 1 second in 2003 is taking over 10 seconds in 2007, and Excel
> > is
> > stating it is Not Responsive so even the status bar is not updating. I
> > tried
> > to pull all of the merging out of my loop and do it in one line, thinking
> > that this would be faster, but alas it seems the merging time is
> > proportonal
> > to the amount of sections I'm merging. Anyone else have this issue and
> > know
> > how to fix?
> >
> > --
> > *********************
> > J Streger
> > MS Office Master 2000 ed.
> > MS Project White Belt 2003
> >
> > User of MS Office 2003
> >

>
>

 
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
VBA Calculation - taking forever Forgone Microsoft Excel Programming 1 5th Feb 2009 12:03 AM
NOT LIKE taking forever to run Prav Microsoft Access Queries 2 14th Aug 2008 03:32 AM
Email is taking forever topice Windows Vista Mail 1 25th Dec 2007 05:45 PM
Taking forever desgnr Microsoft Word New Users 3 25th Jan 2007 08:53 PM
Calculating Cells Taking Forever =?Utf-8?B?SmFzb24=?= Microsoft Excel Misc 2 14th Sep 2006 07:13 PM


Features
 

Advertising
 

Newsgroups
 


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