Hi Everyone! I've run out of options in debugging and am hoping one of you lovely coders can please help me. I am taking a flat file out of a SQL query and crosstabbing it in Excel using VBA. I'm essentially doing the same thing a pivot table does, but without having to create a pivot table it reduces my overhead and makes things easier for me. However, I am running it across several workbooks and need the data range in the FROM clause to be a variable since my data ranges will change depending on what workbook I am using. Thank you SO MUCH in advance for any guidance.
'**I've tried formatting the range as a table and setting the range as a range and inserting it into the FROM clause and still can't get it to work**![]()
Please Login or Register to view this content.
'**However, if I had this in the FROM clause - "FROM [Action Sports$A1:O1112] " & _ it works perfectly fine, but then it isn't dynamic**![]()
Please Login or Register to view this content.
'**It errors and says the Microsoft Jet Database doesn't recognize TempTable once this piece of code runs**
![]()
Please Login or Register to view this content.
Bookmarks