Stephanie30
New Member
- Joined
- May 21, 2015
- Messages
- 13
Hi
I need help in writing a vba code which would connect to SQL and run a SQL statement to generate a report based on company name. The code should then save the output to the defined location in the excel data table
The data table in excel has company names from b2:b50. Column C is a user field where a user will mention as YES if they need the report for that company.
The user will also mention in column D whether which location they would want to save the report output
Once when the above is updated, the user will trigger the macro and the code should connect to SQL database and extract Reports based on the company name mentioned in column B
I need help in writing a vba code which would connect to SQL and run a SQL statement to generate a report based on company name. The code should then save the output to the defined location in the excel data table
The data table in excel has company names from b2:b50. Column C is a user field where a user will mention as YES if they need the report for that company.
The user will also mention in column D whether which location they would want to save the report output
Once when the above is updated, the user will trigger the macro and the code should connect to SQL database and extract Reports based on the company name mentioned in column B
Last edited: