Using VBA to directly upload the data Excel spreadsheet to MS Access
I have a question regarding about MS Access database and VBA. I would like to build in a command button that would do the work for me in the way that I would push the data from EXCEL spreadsheet directly to the database. I know that I can do that by using VBA. Please give me some inputs. Thank you very much.
Re: Using VBA to directly upload the data Excel spreadsheet to MS Access
Take a look at TransferSpreadsheet in VBA help. This should get you started, unless of course you are want specific information from specific locations on the spreadsheet then you will need to control Excel from Access.
If you need to do the latter then post back and I'll show you some code
Re: Using VBA to directly upload the data Excel spreadsheet to MS Access
This is my first time working with VBA. So I don't know what I am doing. Please give me some sample codes or guide me in some direction. I truly appreciate it.
Here is what I want to do. Every Monday, I recieve some data from other centers via Email. So I have a local Workbook on my local desk top. What I would do is to copy the data manually from the spreadsheet into an 'Access' Workbook. So what I would like to do is to build in 'a command button' that would automatically pull the data from C:\Data\Workbook directly to Workbook in Access Database.
Please help. Thank you so much.
Re: Using VBA to directly upload the data Excel spreadsheet to MS Access
Is it a specific Access database of a new one everytime? You can just go into Access and do an Import by changing the file types your looking at to Excel files, browse for the correct one, and then go through the step. No vba required, and your using a built in functionality alot more reliable than vba, especially if your just starting out.
What your asking can be done with vba, but provide some insight into where the info goes in the Access db like file names, table names, forms, etc.........