Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default autofilter macro causes #VALUE! error

Using Excel 2003..

I created a simple macro command button... Autofilter - Custom - equals "Open" OR equals "Active

When I autofilter with the same criteria, things work fine. If I use the autofilter macro, it causes #VALUE! errors in several cells.

I have a UDF...

Function isformula(rng As Range

Application.Volatile (True
isformula = rng.HasFormul

End Functio

An example of a formula causing the error: =IF(K55="","",IF(AND(isformula(K55),K55=TODAY())," ",TODAY())

It seems related to recalculate and the UDF... b/c once I press F9, the errors are gone. But I can't figure out how to force recalculation within the macro. (I don't want users to have to press F9) I've tried application.calculate, and other suggestions found in this news group, but nothing's worked so far

Any suggestions?

TIA
Jill.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default autofilter macro causes #VALUE! error

Try "Worksheets("SheetName").Calculate.

HTH
Ed

"Jill" wrote in message
...
Using Excel 2003...

I created a simple macro command button... Autofilter - Custom - equals

"Open" OR equals "Active"

When I autofilter with the same criteria, things work fine. If I use the

autofilter macro, it causes #VALUE! errors in several cells.

I have a UDF...

Function isformula(rng As Range)

Application.Volatile (True)
isformula = rng.HasFormula

End Function

An example of a formula causing the error:

=IF(K55="","",IF(AND(isformula(K55),K55=TODAY())," ",TODAY()))

It seems related to recalculate and the UDF... b/c once I press F9, the

errors are gone. But I can't figure out how to force recalculation within
the macro. (I don't want users to have to press F9) I've tried
application.calculate, and other suggestions found in this news group, but
nothing's worked so far.

Any suggestions??

TIA,
Jill.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default autofilter macro causes #VALUE! error

still doesn't seem to be working...

----- Ed wrote: ----

Try "Worksheets("SheetName").Calculate

HT
E

"Jill" wrote in messag
..
Using Excel 2003..
I created a simple macro command button... Autofilter - Custom - equal

"Open" OR equals "Active
When I autofilter with the same criteria, things work fine. If I use th

autofilter macro, it causes #VALUE! errors in several cells
I have a UDF..
Function isformula(rng As Range
Application.Volatile (True

isformula = rng.HasFormul
End Functio
An example of a formula causing the error

=IF(K55="","",IF(AND(isformula(K55),K55=TODAY())," ",TODAY())
It seems related to recalculate and the UDF... b/c once I press F9, th

errors are gone. But I can't figure out how to force recalculation withi
the macro. (I don't want users to have to press F9) I've trie
application.calculate, and other suggestions found in this news group, bu
nothing's worked so far
Any suggestions?
TIA

Jill




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default autofilter macro causes #VALUE! error

Sorry, Jill. I have a macro in which I use
' Update calculations in tables
wb2.Worksheets("Sheet1").Calculate
wb2.Worksheets("Sheet2").Calculate
wb2.Worksheets("Sheet3").Calculate
with no problems (wb2 has been declared and set). If these don't do it,
then maybe the issue is not with Calculate. If so, then it's probably 'way
beyond me.

Ed

"Jill" wrote in message
...
still doesn't seem to be working...

----- Ed wrote: -----

Try "Worksheets("SheetName").Calculate.

HTH
Ed

"Jill" wrote in message
...
Using Excel 2003...
I created a simple macro command button... Autofilter - Custom -

equals
"Open" OR equals "Active"
When I autofilter with the same criteria, things work fine. If I

use the
autofilter macro, it causes #VALUE! errors in several cells.
I have a UDF...
Function isformula(rng As Range)
Application.Volatile (True)

isformula = rng.HasFormula
End Function
An example of a formula causing the error:

=IF(K55="","",IF(AND(isformula(K55),K55=TODAY())," ",TODAY()))
It seems related to recalculate and the UDF... b/c once I press

F9, the
errors are gone. But I can't figure out how to force recalculation

within
the macro. (I don't want users to have to press F9) I've tried
application.calculate, and other suggestions found in this news

group, but
nothing's worked so far.
Any suggestions??
TIA,

Jill.






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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Excel Autofilter Error linglc Excel Discussion (Misc queries) 1 January 23rd 08 01:14 AM
Excel Autofilter error linglc Excel Discussion (Misc queries) 0 January 23rd 08 12:20 AM
Macro runtime error 1004 with Autofilter Lorna B Excel Discussion (Misc queries) 3 May 25th 07 08:38 PM
VBA Autofilter error in '97, not 2000 Foggy Excel Programming 3 April 3rd 04 03:57 AM


All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"