+ Reply to Thread
Results 1 to 4 of 4

Can you control a data connection by cell reference

  1. #1
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Can you control a data connection by cell reference

    Hi,

    I want to establish a data connection that looks at a web based csv, comma delimited file. I can do this manually but I need to be able to say that the path of the CSV file is stored in a specific cell.

    On the file attached for the example B3 on Data Connections is where the csv path is held, but I can not seem to get a data connection to look at that with out having to manually create the connection.

    If anyone can advise that world be great

    Thanks

    Danny
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Can you control a data connection by cell reference

    You could setup a macro that changes the connection:

    Please Login or Register  to view this content.
    You could setup the Data Connections page to start the macro when you change the dropdown i.e.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    05-27-2014
    Posts
    141

    Re: Can you control a data connection by cell reference

    Thanks for the Input, this would be a great way going forward as I can set the VBA to run on startup.

    But unless I am missing something I get the following error

    'run-time error '1004' Application-defined Name of object-defined mirror on the line
    Please Login or Register  to view this content.
    Thanks

    Danny

  4. #4
    Valued Forum Contributor spitfireblue's Avatar
    Join Date
    01-29-2015
    Location
    Adelaide, Australia
    MS-Off Ver
    2007,2010,2016
    Posts
    611

    Re: Can you control a data connection by cell reference

    Sorry, I have been offline for the past few days.
    My guess is that the Query Table is not located in cell A1, so just change the A1 to where the table is located

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 03-07-2016, 05:07 AM
  2. Replies: 1
    Last Post: 10-02-2015, 11:05 AM
  3. Replies: 2
    Last Post: 05-15-2015, 04:12 PM
  4. Using cell reference to control formula
    By LarryG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2008, 11:09 PM
  5. [SOLVED] Using a cell reference in a connection string
    By Simon in forum Excel General
    Replies: 1
    Last Post: 08-23-2006, 07:58 AM
  6. [SOLVED] Connecting ADO connection to VB Control Button
    By Steff in forum Excel General
    Replies: 2
    Last Post: 06-20-2006, 08:35 AM
  7. Form Control for Cell Reference
    By John Hutcins in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2006, 05:30 PM

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