+ Reply to Thread
Results 1 to 1 of 1

Can WHERE clause use a variable

Hybrid View

Peanuts890 Can WHERE clause use a... 09-01-2011, 06:10 AM
  1. #1
    Registered User
    Join Date
    01-21-2009
    Location
    Rugby, England
    MS-Off Ver
    Excel 2007
    Posts
    22

    Can WHERE clause use a variable

    I have a recorded macro which basically does a query on an external worksheet with a filter on a date column and a department number column. Macro attached.
    The .CommandText statement has a WHERE clause in it which filters the date and department number and I am wondering if there is a way of making these filters variables such as MyDate and MyDept.
    Many thanks
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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