Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Autofilter through vbscript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,63017
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Autofilter through vbscript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Autofilter through vbscript - 7/31/2008 9:10:25 PM   
  abhvar

 

Posts: 7
Score: 0
Joined: 4/27/2008
Status: offline
 
Hi,

Here's my script. The problem I am facing is i need to make 2 selections in autofilter one being CM and other CR. But what is the synatx for selecitng both in the autofilter in vbscript. Could anybody please help me with it.

Dim objExcelInput
Dim objSheetInput
Dim MyInputFile
Set objExcelInput = CreateObject("Excel.Application")

MyInputFile = "C:\APD_Customer.xls"
objExcelInput.Workbooks.open MyInputFile
Set objSheet = objExcelInput.ActiveWorkbook.Worksheets(1)
objExcelInput.worksheets("Sheet1").Range("A1").AutoFilter 12, "CM"

objExcelInput.WorkBooks.close
 
 
Post #: 1
 
 RE: Autofilter through vbscript - 8/1/2008 1:34:14 AM   
  dm_4ever


Posts: 2670
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Have you tried recording a macro to help get you in the general area?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to abhvar)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Autofilter through vbscript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts