LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 121
Default how to filter first column only in range

what is the criteria? should be in format:

Selection.AutoFilter Field:=1, Criteria1:="<= 100"

"Rea" wrote in message
...
Hey eb
I need to filter column A only in some sheet.
I'm having trouble with setting the Field parameter in autofilter().

This is my code:

Set xlApp = CreateObject("Excel.Application")
Set xlWb = xlApp.workbooks.Open("D:\myExcel.xls")
Set xlWs = xlWb.Worksheets("myWorkSheet")
xlWs.Activate
xlWs.Range("A1:Z1").AutoFilter 1 =filters all columns in sheet
xlWs.Range("A1:Z1").AutoFilter Field:=1 =filter fails will error...

Any advice??

TIA
Rea




 
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
How do I count nonblanks in column A when I filter by column B RP3 Excel Worksheet Functions 5 January 13th 09 05:05 PM
use "Filter" to filter one range in many worksheets at a time arrowofsun Excel Worksheet Functions 0 July 31st 07 12:56 PM
CountIf first column range = "Word" and second column range <> 0 TinaMo Excel Worksheet Functions 3 June 3rd 05 10:56 PM
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du TC Excel Worksheet Functions 1 May 12th 05 02:06 AM
Transfering VBA Array Column Range to Excel Column Range ExcelMonkey[_11_] Excel Programming 5 January 22nd 04 05:57 PM


All times are GMT +1. The time now is 04:46 PM.

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"