Looking for DAILY content? Join us on my other channel “Coffee With Steve” for daily videos where we discuss Technology, Software Development, Politics, Culture, and many other things. Coffee With Steve: ru-vid.com/show-UCeXAUvo5xxDY_b-lSknPC1A
This is the best of the best VBA tutorial that I have ever seen. It's step by step and the instructions are clear. You saved my graduation project, thanks man.
Excellent tutorial Mr. Steve Bishop. I wish you had another one just to append records to that table created first time so that I could do things that way for the office that I work for.
I love this! He went fast, so I did not have to sit an wait.... and I could always pause it if I needed to slow it down. The explanations are so GREAT! I am not well versed in vba, so this was perfect! Steve should be a professor! :)
Another great vidoe Steve. One thing to consider in the filter settings is to include "*xlsm" and"*.xlsb" files. The second is not very common, but many data collection spreadsheets are macro enabled.
hi dear steve that was so good , I just have a question. when i click on import Spreadsheet button it works with no error and microsoft access make a table , now if i click on it one more time the table duplicate , how can i prevent this action? how should i change codes? i will preciate if you can help me on this . can you make a video about how to append data from excel to access table in the same way? thanks and sorry for my english
If you change tableName to the actual table name in Access, it appends the data rather than creating a new table. That's how it worked for me anyway 🤷♀️ Be mindful of the existing records already in the table
Hi Mr. Bishop Thank you for all the videos. Could you make a small video explaining how to export access query with begining date and ending date criteria to an existing file in excel. Thanks a lot
Hi Steve, Very new to VBA - im pretty clued up on Excel Formulas and Power BI DAX but never really dabbled VBA. I have spent a few weeks looking for a CLEAR step by step guide on how to not only write vba to import from Excel to Access but also explanations of each step along the way. I have found this video super informative and wanted to thank you for taking the time to make such an easy to follow guide. I do wonder though - this method "Pulls" data from Excel to Access - do you have any videos on how to Push from Excel to the Access database at all.... Essentially I have around 20 spreadsheets for different customer account ( helpfully the columns are not in the same order either ) and I wish to add these files into a master access DB by adding a macro button onto each file so users just click " send to DB" after completing a line - further caveat, this needs to only "Push" the last used roq and not the entire table. I also need the flexibility to say that on spread sheet 1 Column A = first DB column but on spread 2 column D for example = first DB column. I imagine I would have to write custom ranges into each VB code on each sheet to achieve this,,, Sorry for ranty comment but any assistance would be GREATLY appreciated, Thank you again for the great vid Steve! From Steve!
Thanks but one question.. I dont want a bunch of tables so how would I delete the old table if it exists? The method you provided just creates a number at the end of each new table. Thanks!
Thank you for a thorough explanation. It would be great to see an explanation of appending Excel data to an existing table. Also, I would really like to learn how to append data to multiple tables from a single Excel file. For example, let’s say if I’m storing customer names in one table, in another table I’m storing provinces and a third table contains all orders. Is it possible to append new information to all three tables from a single imported spreadsheet?
+Lena Smith well once you've imported the whole spreadsheet into a table you can use a regular append query to add the data from your new table to the other tables. Just watch my insert/append query videos for more.
This a great video! Do you have video that shows how to import data from an Excel file where you only want data from certain columns that may or may not be in series?
Hi, Thank you for this video! When I import a Excel spreadsheet, is it possible to import it to an existing table instead of creating a new one as "Me.textFileName"? I also wonder if I can map the excel spreadsheets columns to another in the table, for example the column "Amount" should go to the column "Rate" in the table and if a cell is blank it should put in a value as "0"? I have tried to look in your other videos but can not find something like that, if you already have a video for that I ask, can you please link it? Thanks in advance!
Excelent demonstartion of VBA in Access. Q If the first row of the excel spreadsheet contains rogue data and the 2nd row contains the column names how do I get access to ignore that first row
I know it's been a few years, but acLink is a good option to create a temporary table if Access is having problems casting the datatype for a particular field. I've found that if you pull it in as a link and then append the data to a table, then destroy the link, it works a lot better. Doing this, you can use a file picker to grab the file name any time you want to import/update
Hi this is very useful to me . Just now I start learning access. I have doubt in this video importing the excel file in separate table for me. Excel data should be import in single table. Can you plz help me on this....!!
I tried to import an ".xlsx" extension format but it didn't work, the docmd.TransferSpreadsheet didn't work with that extension, Could U please give me a solution???
Thank you for the video! I've tried using this feature at work, but unfortunately I don't know how I can get it to work with access running via RDP as a remote app. Users are unable to select any files located on their hard drive. Is there anyway around this?
Unfortunately the Open File Dialog did not function correctly for me with the coding supplied, I entered, checked and re-checked and compiled the coding and it is exactly the same at displayed, with no errors, but I had the peculiar effect of the dialog box opening twice, the first time it did not fill in the text file but the second time it did. After extensive tracking with '"stops" and "msgbox" commands inserted in different locations in the coding I am afraid that I have not arrived at the solution for this weird effect. I was wondering if anyone else has had the same effect. I am running Office Professional Plus 2016.
Hi Steve. Thank you for this good tutorial. I just wanted to comment on using "for each loop" after file dialog. I have been using the file dialog with allowmultiselect=False without for each loop and it works. Did you test that?
Hi, do you have any clips related to unstructured data from a text file? I really want to update the MsAccess app that helps me in the Eu4 game with tons of modifiers that are stored in some files that have structure somehow similar to JSON files. I would really enjoy data mining them using VBA and automatically update my MSAccess tables. Would be really really great if you can do a clip on this topic.
I have a question of second part of the import excel spreadsheet document. That is about ImportButton. Here there is a code where I recieve an error while debug it. The debug is signals in Me.txtFileName part. If FSO.FileExists(Me.txtFileName) Then ExcelImport.ImportExcelSpreadsheet Me.txtFileName, FSO.GetFileName Original representation of code is, Private Sub btnImportSpreadsheet_Click() Dim FSO As FileSystemObject If FSO.FileExists(Me.txtFileName) Then ExcelImport.ImportExcelSpreadsheet Me.txtFileName, FSO.GetFileName End If DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel12, "Dyeing", Me.txtFileName, True, strSelectedWorksheetName & "!" End Sub Thank you very much if anyone can answer it.
Hi, Do you have any Videos on Importing a CSV file? I thought maybe i would use the same method but the problem is that you said "IT HAS to be an Excel file?"
Excellent Video! So if I were wanting to import Excel into an already created table, how would I code it? Also, where would I put the logging code...the very beginning or the end?
Logging can be done anywhere. To import into an existing table, you should follow the same process into a new table. Then run a query to insert all of the records from the new table into the old one.
Hi Steve again! I just could not use /CurrentDb.execute "Drop Table " before importing./ in order to delete the already existed table. could you show us this practically?thanks.
hello I have a question, how can I if I order an exel file and paste into your Access Exel file with your written - How To Import To Excel Spreadsheet With VBA In Access 2013 ??
Hello, I am getting an error code Run-Time err 438...... object doesn't support this object or method... Set diag = Application.FileDialog(msoFileDialogFolderPicker) diag.AllowMultiSelect = False diag.Title = "Escoger Archivo" diag.Filters.Clear diag.Filters.Add "Excel", "*.xlsx" --> here is whe i get the error when I click on the boton. Can you guys help me out??/
Hi Steve, every time I import the excel, a new table is created. Please advise how to code such that the content of the access table is deleted and replace by the imported excel file.
Steve. Thank you for posting this video. I get an error on Me.txtFileName. "Method or data member not found." The intellisense does not recognize this property. I have added the reference to Microsoft Office library 16.0. Can you suggest how to resolve this error? Thanks
I talked myself into being responsible for creating a new database for work, without having any clue about this stuff. You, sir, saved my life with videos like this one. They way you quickly explain every line of code and every expression, even if it's not needed, perfect for beginners and good for general learning! Thank you!
Why in Excel 2016, diag.Filters.Add "Excel Spreadsheets", "*.xls, *.xlsx" is giving me Object doesn't support this property or method....Run-time error 438:
Since an Excel spreadsheet can have multiple tabs (or pages), it would of been ideal if the import function called the individual tabs as separate tables into access rather than use the file name as the access db table name.
Excellent video! Thank you a lot! One more tip I just figured out: if you want to choose a specific WorkSheet from the excel file, you can write the spreadsheet name with an exclamation mark (e.g., "MyFirstSheet!") instead of leaving the range parameter (8:39) blank.
thank you for this course but when i click browse, display error excution '438' debug in command : diag.Filters.Add "Excel SpreadSheets", "*.xls, *.xlsx" help please
Thanks for the tutorial. It helps me a lot with my work. I have question, what if we import the same file name? can you show how replace the old file name? another question is that I have existing table in Backend file and want to import from from FrontEnd by appending only the new record. Do you have another VDO tutoring?
Nice information.... Could you please help me to open pw protected access file using excel vba. I tried multiple ways Eventhough am not getting.. Can you please
This tutorial helped a lot but one problem the "Badformat" VBA code conflicts when trying to import an Excel currently opened by another user. Where it wouldn't be a problem I can see where this can be later down. Is there a way to check if file is being imported read only
There is "Codician" channel person has copied your code, Video name is "import data from excel to access vba on a click". I believe you should take the action on it. Such deep shit are copying your Codes.
thanks for this tutorial. it's the best tutorial I've ever seen, and it's very helpful. but I have a problem. if I want to import several excel files on the same access table, it only imports data on the first excel and it does not want to import on the next excel. it doesn't add any more data I need. there is a thoughtful view to this issue. thank you.