Hello there,
I am trying to make a vba code that gives me the option to choose wich file from the usb stick i want to open, then opens up the file where I then can load an access database file, which then copies the data from the specific table with name of access database.
I have do a try but it doesn't work
Sub money()
'
' money?a???e?t???
'
'
ChDir "D:\"
Workbooks.OpenDatabase Filename:="D:\money1.mdb", CommandText _
:=Array("daily"), CommandType:=xlCmdTable, ImportDataAs:= _
xlTable
Range("A1:G12").Select
Selection.Copy
Windows("base - flow1 - copy.xlsm").Activate
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
End Sub
I am trying to make a vba code that gives me the option to choose wich file from the usb stick i want to open, then opens up the file where I then can load an access database file, which then copies the data from the specific table with name of access database.
I have do a try but it doesn't work
Sub money()
'
' money?a???e?t???
'
'
ChDir "D:\"
Workbooks.OpenDatabase Filename:="D:\money1.mdb", CommandText _
:=Array("daily"), CommandType:=xlCmdTable, ImportDataAs:= _
xlTable
Range("A1:G12").Select
Selection.Copy
Windows("base - flow1 - copy.xlsm").Activate
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
End Sub