i am using a one drive and the error i am getting when i try to run my access connection is .... the below noted file name is not a valid path. Please make sure that the path name is spelled correctly and that you are connected to the server in which the file resides.
I get the error but for the life of me i am not understanding the onedrive syntax of the file location. I am hoping it is just a quick fix because I loved this method of saving data from excel to access...
MY VBA CODE:
'excel file that you want to export data to the Access database.
Dim mData As String
mData = ActiveWorkbook.Name 'this shows the excel workbook that is active
Dim mrow As Integer ' counting of rows in the sheet to Be exported
'CREATE THE CONNECTION...
Dim mConnection As ADODB.Connection
Set mConnection = New ADODB.Connection
'"CREATE THE LINK" to the access database master data file using your connection created
Dim mtransit_file As String
mtransit_file = "provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=C:\USERS\(myname)OneDrive-personal(xxxxxx@comcast.net)\INSURANCE\QuoteS1.accdb"
mConnection.Open mtransit_file
Thank you in advance for your assistance...
I get the error but for the life of me i am not understanding the onedrive syntax of the file location. I am hoping it is just a quick fix because I loved this method of saving data from excel to access...
MY VBA CODE:
'excel file that you want to export data to the Access database.
Dim mData As String
mData = ActiveWorkbook.Name 'this shows the excel workbook that is active
Dim mrow As Integer ' counting of rows in the sheet to Be exported
'CREATE THE CONNECTION...
Dim mConnection As ADODB.Connection
Set mConnection = New ADODB.Connection
'"CREATE THE LINK" to the access database master data file using your connection created
Dim mtransit_file As String
mtransit_file = "provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=C:\USERS\(myname)OneDrive-personal(xxxxxx@comcast.net)\INSURANCE\QuoteS1.accdb"
mConnection.Open mtransit_file
Thank you in advance for your assistance...