Consulting

Results 1 to 2 of 2

Thread: Excel VBA

  1. #1

    Excel VBA

    I want to save any extension file into Access DB using Excel VBA file Dialog Box. Do anyone know how to do it Thank You.

  2. #2
    Here is the code but this saves file on my computer I want it should save in Access directly. Thank you
    Dim cnn As ADODB.Connection
    Set cnn = New ADODB.Connection
    Dim fd As FileDialog
    Dim var As Boolean
    Set cnn = New ADODB.Connection
    cnn.ConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & ThisWorkbook.Path & "\File.accdb;Persist Security Info=False;"
    Set fd = Application.FileDialog(msoFileDialogSaveAs)
    fd.Show
    If Not var Then
    MsgBox "Enter name to save file"
    End If
    fd.Execute

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •