If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Importing EXCEL Spreadsheets into ACCESS
Here's what I've been tasked to come up with -- not sure if this is doable,
but here goes: Here's a VBA version of the Macros I created to import the EXCEL spreadsheet data ... ================================================== = Option Compare Database '------------------------------------------------------------ ' Copy_of_Ala_1403_Spreadsheet_Import_Macro ' '------------------------------------------------------------ Function Copy_of_Ala_1403_Spreadsheet_Import_Macro() On Error GoTo Copy_of_Ala_1403_Spreadsheet_Import_Macro_Err ' Runs Ala 1403 All Staff Macro DoCmd.RunMacro "Ala 1403 All Staff", , "" ' Runs Ala 1403 Development Macro DoCmd.RunMacro "Ala 1403 Development", , "" ' Runs Ala 1403 PASC Macro DoCmd.RunMacro "Ala 1403 PASC", , "" ' Runs Ala 1403 PM Macro DoCmd.RunMacro "Ala 1403 PM", , "" ' Runs Ala 1403 Production Macro DoCmd.RunMacro "Ala 1403 Production", , "" ' Runs Ala 1403 Score Reports Macro DoCmd.RunMacro "Ala 1403 Score Reports", , "" ' Runs Ala 1403 Scoring Programming Macro DoCmd.RunMacro "Ala 1403 Scoring Programming", , "" Copy_of_Ala_1403_Spreadsheet_Import_Macro_Exit: Exit Function Copy_of_Ala_1403_Spreadsheet_Import_Macro_Err: MsgBox Error$ Resume Copy_of_Ala_1403_Spreadsheet_Import_Macro_Exit End Function ================================================== = What my supervisor wants is for me to create a form (in ACCESS) and have the ability to use Windows Explorer to Search for the Network Location of the EXCEL spreadsheet, and when you click on the file, the Path of the file (ie. O:\Financial Projects\M Shane\All Staff Time Budget AL1403.xls) is captured and inserted into a MACRO or VBA Module. Likewise, she wants the ability to choose which table (within ACCESS) the spreadsheet gets imported/appended to (without having to go back into the MACRO and edit the code) -- her expectation is that she should be able to type the NEW name of a Table on this form, and VIOLA! One final item -- she would like a confirmation of the IMPORT (to include the following Table Fields/Network Path to EXCEL spreadsheet/Date-Time Stamp/UserName (of the person doing the IMPORT) Any ideas on this would be greatly appreciated. |
Thread Tools | |
Display Modes | |
|
|