Macro for Import in Access

Asked

Viewed 71 times

1

I need help to create an import macro in Access, in case using Visualbasic, I need to download a zip file, inside this zip there is an excel spreadsheet, I need to extract it, copy all the data, copy and paste to a table, this process must be repeated twice more but for other links, files and tables, can help?

  • Please post your code and where you are encountering difficulties, so we can help.

  • @davidterra I made the zip module, now the download and import I have no idea how to do Imports System.IO
Imports System.IO.Compression

Module Module1

 Sub Main()
 Dim startPath As String = "d:\teste" 
 Dim zipPath As String = "d:\teste\teste.zip" 
 Dim extractPath As String = "c:\teste\extract"

 ZipFile.CreateFromDirectory(startPath, zipPath)

 ZipFile.ExtractToDirectory(zipPath, extractPath)
 End Sub 

End Module

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.