Hello, everyone!
I have an usual data-table on my sheet1
And I want to have it on my sheet2
How to right my vba code to do this using sql query?
Hello, everyone!
I have an usual data-table on my sheet1
And I want to have it on my sheet2
How to right my vba code to do this using sql query?
Privet,
Sql between sheets in the same workbook ?
It's possible to (ADO, QueryTables), but what for ?
Is there any sense ?
Try e.g.:
Select reference to 'Microsoft Activex Data Objects Library' in vba editor: Tools\References
Variant I
Variant IIPlease Login or Register to view this content.
For this data layout of sheet1 on the image below.Please Login or Register to view this content.
See also (other cases), e.g.:
https://www.excelforum.com/excel-pro...mport-csv.html (Kenneth Hobson)
https://www.excelforum.com/excel-pro...ml#post4781871 (jindon)
Last edited by mjr veverka; 02-09-2018 at 10:48 PM.
Thanks!!
I was in need to rename in properties my sheet name
But at the end all was fine!
Thanks!!
Change "[Sheet1$]" in sql and in "With Sheet2" in code depending on your needs, not in vba project.
E.g.: "[List1$]" and "With List2" or others names.
"With Sheet2" - "Sheet2" this is the code name of the sheet, not the name of the "sheet tab", "sheet tab" may have a different name.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks