No matter how the file was received - Email, downloaded from cloud etc...
I want to be able to have the spreadsheet open...
Then run vba in Access (On click)
Import the data from worksheet "data" into Table "TempExcel"
No matter how the file was received - Email, downloaded from cloud etc...
I want to be able to have the spreadsheet open...
Then run vba in Access (On click)
Import the data from worksheet "data" into Table "TempExcel"
Is there a question in there that I don't see?
I would like to know how to reference a spreadsheet that is open but not saved on my computer.
This link should help there: http://stackoverflow.com/questions/5...-in-access-vba
yeah - I saw that...
"you need to set a reference (Menu: Tools->References) to the Microsoft Excel Object Library then you can access all Excel Objects.
I can't find Menu: Tools->References in 2010??
Open the IDE (ctl-G) (aka VBA editer)
Then Tools->References
wow, yeah that was a moment. Yes there it is in the VBA editor. Thanks
Ok this is what I am cobbling together as vba for a form
I am looking at several different sites. I have the References set for Excel objects, so far it does not seem like I am closeCode:Option Compare Database Option Explicit Dim objExcelApp As Object Dim wb As Object Sub Initialize() Set objExcelApp = CreateObject("Excel.Application") End Sub Private Sub Command2_Click() Dim ws As Object Dim XLApp As Excel.Application Set wb = XLApp.ActiveWorkbook Set ws = wb.Sheets("Master") DoCmd.TransferSpreadsheet acImport, , "ImportFromExcel", ActiveWorkbook, True End Sub
You might look at Ken Snell's site
http://www.accessmvp.com/kdsnell/EXCEL_MainPage.htm
Lots of examples