Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Turn On AutoFilter In Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01333201
Message ID:
01333209
Views:
6
This message has been marked as the solution to the initial question of the thread.
>I am trying to use Excel automation to turn on AutoFilter:
>
>
>oExcel = CREATEOBJECT("Excel.Application")
>
>oWorkbook = oExcel.Workbooks.Open(sFileName)
>
>oSheet = oExcel.Workbooks(1).ActiveSheet
>
>oSheet.Cells.Select()
>
>oSheet.AutoFilter = TRUE
>			
>
>
>I get the error "Member not found" on the AutoFilter line. The AutoFilter property shows up in IntelliSense.
>
>Anyone know what I'm doing wrong?

try
...
If NOT oSheet.AutoFilterMode
   oExcel.Selection.AutoFilter
EndIf
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform