artrookie
12-11-2008, 12:52 AM
Hi everyone
I have question on ADODB and VBA, was wondering whether there was a way to have a variable worksheet name using ADODB. I am quite new to using ADODB could not find the answer on the web
sSQL = "SELECT * FROM [WORKSHEET$A1:gL1000]"
So, for the code above WORKSHEET is a reference to another worksheet name. So WORKSHEET maybe "WS1" or "WS2" rather then grab data from sheet called "WORKSHEET" (i hope that makes sense)?
Thanks
artrookie
I have question on ADODB and VBA, was wondering whether there was a way to have a variable worksheet name using ADODB. I am quite new to using ADODB could not find the answer on the web
sSQL = "SELECT * FROM [WORKSHEET$A1:gL1000]"
So, for the code above WORKSHEET is a reference to another worksheet name. So WORKSHEET maybe "WS1" or "WS2" rather then grab data from sheet called "WORKSHEET" (i hope that makes sense)?
Thanks
artrookie