Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2007 VBA - macro stops after autofilter command

I have a spreadsheet that was created in an earlier version of Excel
and is now being used in Excel 2007 with compatibility mode on. One
of the macros filters the data on the sheet, using the autofilter
command, based on selections the user has made via a pop-up form.
Previous to Excel 2007, this was working fine. Now it appears the any
command lines following the autofilter command are ignored. Has
anyone encountered a similar situation?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Excel 2007 VBA - macro stops after autofilter command

Can you post the code where it gets the userform data and the Autofilter is
invoked plus a few lines that you say are not getting processed.

Also is the userform closed before the Autofilter is invoked?

Have you tried putting a msgbox between some of the lines that you believe
are not being processed to establish whether in fact they are not being
processed?

--
Regards,

OssieMac


"KBarrett" wrote:

I have a spreadsheet that was created in an earlier version of Excel
and is now being used in Excel 2007 with compatibility mode on. One
of the macros filters the data on the sheet, using the autofilter
command, based on selections the user has made via a pop-up form.
Previous to Excel 2007, this was working fine. Now it appears the any
command lines following the autofilter command are ignored. Has
anyone encountered a similar situation?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Excel 2007 VBA - macro stops after autofilter command

KBarrett wrote:
I have a spreadsheet that was created in an earlier version of Excel
and is now being used in Excel 2007 with compatibility mode on. One
of the macros filters the data on the sheet, using the autofilter
command, based on selections the user has made via a pop-up form.
Previous to Excel 2007, this was working fine. Now it appears the any
command lines following the autofilter command are ignored. Has
anyone encountered a similar situation?


Not that particular one, but it is worth looking in the MSKB to see if
they actually admit to a problem with migrating XL2003 autofilter.

Does it stop with an error or appear to skip lines of code?

I have basically lost count of the number of horrors I have seen moving
complex spreadsheets with VBA from XL2003 to XL2007. I cannot for the
life of me see why anyone would install XL2007 until it is actually
stable. Productivity takes an instant dive and never seems to recover.
Still the customer is always right - even when they say there are two
M's in custommer (sic).

It is great fun watching experienced XL2003 users struggle to find where
in the new ribbon interface crucial options have been hidden.

Regards,
Martin Brown
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2007 VBA - macro stops after autofilter command

On Jul 27, 4:52*pm, KBarrett wrote:
I have a spreadsheet that was created in an earlier version of Excel
and is now being used in Excel 2007 with compatibility mode on. *One
of the macros filters the data on the sheet, using the autofilter
command, based on selections the user has made via a pop-up form.
Previous to Excel 2007, this was working fine. *Now it appears the any
command lines following the autofilter command are ignored. *Has
anyone encountered a similar situation?


I think I may have stumbled upon the cause of the problem. The
worksheet has a LOT of conditional formatting that has gotten messy
over the years but had never caused a problem in previous versions of
Excel (one of the things on my 'to-do' list was to clean it all up in
the 2007 version). When I removed all of the conditional formatting
from the sheet, my code ran fine and continued on past the autofilter
commands. I'm guessing the code was hanging on trying to evalute the
conditional formatting after the autofilter? I had put a timer in
the code before and after the one autofilter line, but lost patience
after waiting 15 minutes (there are only 4500 lines of data on the
sheet). As I sais, this wasn't a problem in Excel 2003. Now I have
to go back and add a cleaned-up version of the conditional formatting
and hope it doesn't hang on the autofilters again. Ahhhh,
Progress!! :-)

Thanks for the responses that helped get me thinking "outside the box"
on ths one!

Karen
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Excel 2007 VBA - macro stops after autofilter command

KBarrett wrote:
I have a spreadsheet that was created in an earlier version of Excel
and is now being used in Excel 2007 with compatibility mode on. *One
of the macros filters the data on the sheet, using the autofilter
command, based on selections the user has made via a pop-up form.
Previous to Excel 2007, this was working fine. *Now it appears the any
command lines following the autofilter command are ignored. *Has
anyone encountered a similar situation?


I think I may have stumbled upon the cause of the problem. The
worksheet has a LOT of conditional formatting that has gotten messy
over the years but had never caused a problem in previous versions of
Excel (one of the things on my 'to-do' list was to clean it all up in
the 2007 version). When I removed all of the conditional formatting
from the sheet, my code ran fine and continued on past the autofilter
commands. I'm guessing the code was hanging on trying to evalute the
conditional formatting after the autofilter? I had put a timer in
the code before and after the one autofilter line, but lost patience
after waiting 15 minutes (there are only 4500 lines of data on the
sheet). As I sais, this wasn't a problem in Excel 2003. Now I have
to go back and add a cleaned-up version of the conditional formatting
and hope it doesn't hang on the autofilters again. Ahhhh,
Progress!! :-)

Thanks for the responses that helped get me thinking "outside the
box"
on ths one!


Karen


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2007 VBA - macro stops after autofilter command

On Jul 31, 3:19*am, KBarrett wrote:
*KBarrett wrote:
I have a spreadsheet that was created in an earlier version of Excel
and is now being used in Excel 2007 with compatibility mode on. *One
of the macros filters the data on the sheet, using the autofilter
command, based on selections the user has made via a pop-up form.
Previous to Excel 2007, this was working fine. *Now it appears the any
command lines following the autofilter command are ignored. *Has
anyone encountered a similar situation?


I think I may have stumbled upon the cause of the problem. *The
worksheet has a LOT of conditional formatting that has gotten messy
over the years but had never caused a problem in previous versions of
Excel (one of the things on my 'to-do' list was to clean it all up in
the 2007 version). *When I removed all of the conditional formatting
from the sheet, my code ran fine and continued on past the autofilter
commands. *I'm guessing the code was hanging on trying to evalute the
conditional formatting after the autofilter? * I had put a timer in
the code before and after the one autofilter line, but lost patience
after waiting 15 minutes (there are only 4500 lines of data on the
sheet). *As I sais, this wasn't a problem in Excel 2003. *Now I have
to go back and add a cleaned-up version of the conditional formatting
and hope it doesn't hang on the autofilters again. *Ahhhh,
Progress!! *:-)

Thanks for the responses that helped get me thinking "outside the
box"
on ths one!

Karen


You are not the only one with this problem, as I have the same.

nod
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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
2007 excel autofilter change back to 2003 autofilter? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 05:53 PM
macro stops on "selection.autofilter" line of code Rob Excel Programming 5 December 10th 05 02:50 PM
Autofilter stops responding gazbea Excel Worksheet Functions 1 November 8th 05 03:24 PM
Autofilter Stops Working Vliegveld Excel Worksheet Functions 7 September 7th 05 01:19 AM


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