Import one Excel Spreadsheet at a time!

voskouee

Registered User.
Local time
Yesterday, 20:41
Joined
Jan 23, 2007
Messages
96
I have a default directory that will contain Excle spreadsheets. This spreadsheets have the name of the table i want them to create when they are imported in Access.

I want first to count and present to the user the number of the spreasheets. then import one name the table with the name of the spreadsheet and then process. When done move to the next one until there is no more in the directory...

How can i write this in VBA?

Can someone help me?
 
Use "File Systems Object", they're detailed (with examples) extensively in the Help Menu, to cycle through the files in a folder.

FileSystemObjects/Methods

Attributes Property
CreateTextFile Method
DriveExists Method
Drives Property
FileExists Method
Files Property
Folder Object
FolderExists Method
GetAbsolutePathName Method
GetDrive Method
GetDriveName Method
GetExtensionName Method
GetFile Method
GetFolder Method
GetParentFolderName Method
IsRootFolder Property
ParentFolder Property
Path Property
ShortPath Property
SubFolders Property

Required Reference: Microsoft Scripting Runtime
 

Users who are viewing this thread

Back
Top Bottom