K
Keith Howard
There seems to be some inconsistency between the Excel VBA and the Excel Dot
Net object models. I implemented auto filtering via the following code in
Excel VBA:
Selection.AutoFilter
However, when I tried to do the same thing in Dot Net, via the following
code, the AutoFilter object was not available, causing a compilation error:
Friend Shared Sub gsxxxAutoFilter(ByVal vvwksActive As Worksheet)
vvwksActive.Cells.Select()
vvwksActive.selection 'This does not compile because the selection
method does not exist.
vvwksActive.Application.Selection.autofilter() 'This does not
compile because the autofilter method does not exist, even though I was able
to access the Selection object via the Application object.
End Sub
Does anyone know how to access the AutoFilter method via Dot Net?
Thanks in advance.
Keith
Net object models. I implemented auto filtering via the following code in
Excel VBA:
Selection.AutoFilter
However, when I tried to do the same thing in Dot Net, via the following
code, the AutoFilter object was not available, causing a compilation error:
Friend Shared Sub gsxxxAutoFilter(ByVal vvwksActive As Worksheet)
vvwksActive.Cells.Select()
vvwksActive.selection 'This does not compile because the selection
method does not exist.
vvwksActive.Application.Selection.autofilter() 'This does not
compile because the autofilter method does not exist, even though I was able
to access the Selection object via the Application object.
End Sub
Does anyone know how to access the AutoFilter method via Dot Net?
Thanks in advance.
Keith