LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default VB Question - AutoFilter related - 'Criteria1:' secion of my code

Hi,

I have a simple bit of code to take me to another worksheet and
automatically select specific information falling under a autofilter.
Sample below:

Sheets("Sheet2").Select
Selection.AutoFilter Field:=1, Criteria1:="RandomText"
Range("A1").Select

This works great but it would be even better if I could refer to a
cell within the spreadsheet. How do I go about changing the criteria
to be a cell reference?

Since I have multiple sheets, do I need to specify the sheet name that
I'm calling the cell reference from?


Many, many thanks if you can help with this.

 
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
Autofilter - formatting criteria1 data for valid comparison Dennis Excel Programming 2 December 4th 06 06:56 PM
can I use a cell content as a Criteria1 reference in the below Selection.AutoFilter statement? prady Excel Programming 1 July 28th 06 04:27 PM
Another Date related question.... Pete Dray Excel Worksheet Functions 7 June 18th 06 11:49 PM
printing related code question anny Excel Programming 1 May 15th 06 05:10 AM
I have a VB related question,... javabeens Excel Programming 1 June 7th 05 05:51 PM


All times are GMT +1. The time now is 02:50 AM.

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"