Results 1 to 4 of 4

use variable in macro for date

Threaded View

  1. #1
    Registered User
    Join Date
    09-16-2010
    Location
    NY
    MS-Off Ver
    Excel 2003
    Posts
    50

    use variable in macro for date

    Hi, I have a macro that I must change about 10 dates in as it autofilters by date in certain columns like this..

    Selection.AutoFilter Field:=7, Criteria1:=">10/15/2010", Operator:=xlAnd, _
    Criteria2:="<10/22/2010"


    Is there a way to make criteria 1 use todays date, and criteria 2 use todays date + 7 days ?
    do i need to use a variable for the system date ?
    Last edited by vsantoro; 10-26-2010 at 09:41 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1