1

I'd like to use a variable inside an array like this

path = "C:\test\folder\"

Array("ODBC;DSN=MS Access Database;DBQ=path;")

but am unable to concatenate the variable into this array correctly.

Do you have a suggestion on how to do this?

0

1 Answer 1

5

You can add strings with the & operator directly into commands such as:

Array("ODBC;DSN=MS Access Database;DBQ=" & path & ";")
Sign up to request clarification or add additional context in comments.

2 Comments

thx @enderland - i tried that but I get Run Time error 1004 (Application defined or object defined error)
Are you sure that works with your filepath? Try directly copying your filepath into the test you are running instead of =path.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.