ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open a file from vba code (https://www.excelbanter.com/excel-programming/401405-open-file-vba-code.html)

Ambarish

Open a file from vba code
 
Hi,
i am writing a piece of code where user is prompted to browse and
choose a .sql file. i am taking the file location in a variable.
Now, i want to connect to the database (Oracle). Once I am connected
to Oracle, instead of writing the query I want to give the filename
which I have stored in a varaible (So the file will open and the query
will be run)

How do I open the file stored in the variable?


Bob Phillips

Open a file from vba code
 
Where is the code that you want to adapt?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Ambarish" wrote in message
...
Hi,
i am writing a piece of code where user is prompted to browse and
choose a .sql file. i am taking the file location in a variable.
Now, i want to connect to the database (Oracle). Once I am connected
to Oracle, instead of writing the query I want to give the filename
which I have stored in a varaible (So the file will open and the query
will be run)

How do I open the file stored in the variable?





All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com