I have a series of things going on when I import a spreadsheet. Every morning I
have to update 11 tables from an outside source.
I have a progress bar that lets me know the progress.here is the vba code that
I use in a nutshell
Private Sub Command161_Click()
'the following macro sends a report that will announce the process is begining
to the users in the group.
DoCmd.RunMacro "mcrSendNoticeBegin", 1
DoCmd.SetWarnings False
Label76.ForeColor = vbRed 'changes the lablel with the caption "Database
Table Transfer" to red
Label76.Caption = "P R O C E S S I N G"
Beep
'MsgBox """get em out""", vbExclamation, ""
'1 ' delete table R&D ACCOUNTS
boxFrame.Visible = True
box1.Visible = True
box2.Visible = True
lblProcessing.Visible = True
lblProcessing.Caption = "Deleting ACCOUNTS"
DoEvents
DoCmd.DeleteObject acTable, "R&D-ACCOUNTS"
after all the tables are deleted I have vba code to transfer the sheets in
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
'Transfer Process Below
'1 ' transfer R&D ACCOUNTS spreadsheet from W:\DATA MANAGEMENT
SERVICES\MASTER PEOPLESOFT TABLES\R&D-ACCOUNTS.xls
lblProcessing.Caption = "Transferring ACCOUNTS"
DoEvents
DoCmd.TransferSpreadsheet acImport, 8, "R&D-ACCOUNTS", "W:\DATA MANAGEMENT
SERVICES\MASTER PEOPLESOFT TABLES\R&D-ACCOUNTS.xls", True, ""
boxFrame.Visible = True
box1.Visible = True
Jim Wagner
________________________________
________________________________
From: Tyrone Lumley <[email protected]>
To: [email protected]
Sent: Monday, January 12, 2009 9:55:32 PM
Subject: Re: [ms_access] Does Macro Runcommand: ImportAttachExcel alllow the
import of Excel to a table?
Yes, you can import an Excel spreadsheet using this command. You should have
the option of importing to a new spreadsheet, or appending to an exsisting one.
I have better luck using VBA, opening an instance of excel using the excel
object model, finding the last cell, and using a for-next to import the
records. More control, and more professional than a macro calling a wizard....
--- On Mon, 1/12/09, Jan <phssthp...@yahoo. com> wrote:
From: Jan <phssthp...@yahoo. com>
Subject: [ms_access] Does Macro Runcommand: ImportAttachExcel alllow the import
of Excel to a table?
To: ms_acc...@yahoogrou ps.com
Date: Monday, January 12, 2009, 6:01 PM
It sure looks like this is the way to go but my book does not talk
about this run command. I did a search on the web and got little.
I want to set up a macro to import an excel worksheet and overwrite an
existing table. I can't figure out the syntax for this. Can you help?
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]