Link to home
Create AccountLog in
Avatar of elliotsegal
elliotsegal

asked on

How do I add query data columns to Excel .xls with VBA script

I'm trying add more query results to a Excel file using ODBC to a MS SQL RDBMS, the Column range that is getting populated with data/results from the queries goes from B to AZ, but when trying top add/insert another column the results for the queried data will not display.

I've looked throughthe VBA scripts in the modules, and can't find where or what I need to change to expand the range.  I believe Module 4 has the scripting I need to change, but I haven't been able to find it/affect a change.  

I've attached a copy of the .xls file which should have the MACROs and script to view for those that can help me with this.    Eng-Meter-Report.xls
SOLUTION
Avatar of Arno Koster
Arno Koster
Flag of Netherlands image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
ASKER CERTIFIED SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of elliotsegal
elliotsegal

ASKER

Also had to add additional vrange definitions but your quick answer and directions were "spot on."

Thanks.