Hi,
Why is there error
due to this line
Set rs = db.openrecordset("select * from " & ActiveSheet.Name & ";")
while ActiveSheet.Name is having value like "Week8-13"?
Hi,
Why is there error
due to this line
Set rs = db.openrecordset("select * from " & ActiveSheet.Name & ";")
while ActiveSheet.Name is having value like "Week8-13"?
@Jackson1990-7147
As your issue is more related to code, and tag "office-excel-itpro" focuses on general issues about Excel client, I will remove it.
Thanks for your understanding.
If the sheet name includes some non alphabetical characters you have to set it in square bracket [ ]; better set it always in brackets
=>
Set rs = db.openrecordset("select * from [" & ActiveSheet.Name & "];")
Sorry, II still have same error using line below
Set rs = db.openrecordset("select * from [" & ActiveSheet.Name & "];")
Viorel,
Excel code to retrieve Access data.
FYI (DB file and Excel file)
https://1drv.ms/x/s!Ai8CrEskdewXvwPP8sr_QRAuLLeQ?e=kzGS5q
https://1drv.ms/u/s!Ai8CrEskdewXvwJry99MPfM5CUy0?e=fiERBZ
YesDoes your Access database include a table, which is called “Week8-13”?
8 people are following this question.