Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer 30    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Import from Excel VB
Abraham Breuer 
     
3 years ago
Hi,
the method using Classic I/O is to read and write to txt files,
How would this be when reading and writing with an MS Excell sheet?
Or is there any other way with VBA to import data from Excell?
Alex Hedley  @Reply  
           
3 years ago
Have you done Expert 20?
Abraham Breuer OP  @Reply  
     
3 years ago
watched them all
I want a VBA Solution as I am disabling for the end user the ribbon.
Abraham Breuer OP  @Reply  
     
3 years ago
does any one have the code to read and write to an Excel sheet with VBA?
Kevin Robertson  @Reply  
          
3 years ago
The easiest way would be with DoCmd.TransferSpreadsheet.

Example:
Dim Filename As String
    
Filename = CurrentProject.Path & "\OrderList.xlsx"
DoCmd.TransferSpreadsheet acExport, , "OrderListQ", Filename, True
FollowHyperlink Filename


Give it a go and explore the different parameters.
Abraham Breuer OP  @Reply  
     
3 years ago
Thanks Kevin,

I will need to read and write to pull in information from an order detail spreadsheet and append it to the database on a regular basis, will this work?

its basicly what the import wizzard does, just automated with vba.
Kevin Robertson  @Reply  
          
3 years ago
Yes. The first parameter is Transfer Type. Set to AcImport to import from Excel. I would recommend importing to a Temp table first so you can check the data first before appending to your main table. In any case remember to make good BACKUPS first.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 30.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/10/2026 7:08:17 PM. PLT: 1s