+ Reply to Thread
Results 1 to 3 of 3

Use a variable when connecting excel to access with vba

  1. #1
    Registered User
    Join Date
    04-04-2009
    Location
    Nashville, TN,USA
    MS-Off Ver
    Excel 2007
    Posts
    87

    Use a variable when connecting excel to access with vba

    I have had great success connecting to a access file through vba! However I am at a point where the column that I and querying could change. I would like some help altering me code. Thank you!

    Please Login or Register  to view this content.
    I have also tried
    Please Login or Register  to view this content.
    but it didn't work either

    See attached for the error message

    Just so you know if I don't use a variable in
    Please Login or Register  to view this content.
    It works fine.

    So I really need to know how to put a variable in there!
    Attached Images Attached Images
    Last edited by rbyrd023; 02-23-2012 at 12:17 PM.

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Use a variable when connecting excel to access with vba

    Please Login or Register  to view this content.
    should do it.
    Good luck.

  3. #3
    Registered User
    Join Date
    04-04-2009
    Location
    Nashville, TN,USA
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Use a variable when connecting excel to access with vba

    Wow how easy was that! Not sure why I missed it. Thank you very much for your help!!! SOLVED

+ 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