Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a spreadsheet like this
A B C ---------------------------------------------------- 2 | 1 123.4586 =my_func(B2) 3 | 2 2123.53132 =my_func(B3) 4 | 1 78231.74853 =my_func(B4) Public Function my_func(tar As Range) As String On Error GoTo handler my_func = tar.Text Exit Function handler: Debug.Print Err.Number End Function Sub test() With Range("$A$2:$A$4") .AutoFilter .AutoFilter Field:=1, Criteria1:="1" End With End Sub Every time I run test() error code 1004 - Unable to get the Text property of the Range class occurs. This error does not occur if I do the autofilter manually. Is there any workaround? Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
autofilter raises error 1004 | Excel Programming | |||
Macro runtime error 1004 with Autofilter | Excel Discussion (Misc queries) | |||
Mysterious Error 1004 caused by AutoFilter? | Excel Programming | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Error 1004 update autofilter and pivottable | Excel Programming |