Hi there,
For my work, I'm creating a PivotTable, which consists gets the data from an external mdb-File. Because the Path of this file should be able to be changed by a VBA script, i would like to create a script, that takes part of the Filepath from a Cell and creates out of that the new path of the mdb file (they all are stored in a Way that this will work out)
Here is now my Script:
The Problem is, that the name of the string gets mistaken as Text. How can i change that?
Thanks in advance
Carvahall
For my work, I'm creating a PivotTable, which consists gets the data from an external mdb-File. Because the Path of this file should be able to be changed by a VBA script, i would like to create a script, that takes part of the Filepath from a Cell and creates out of that the new path of the mdb file (they all are stored in a Way that this will work out)
Here is now my Script:
Code:
"OLEDB;Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source="C:\Folder" & FolderString & "File.mdb";Mode=Share Deny Write;Exten" _
, _
"ded Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Engine Type=5;Jet OLEDB:Database Locking Mod" _
, _
"e=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create" _
, _
" System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without R" _
, "eplica Repair=False;Jet OLEDB:SFP=False;Jet OLEDB:Support Complex Data=False" _
)
.RefreshOnFileOpen = False
.SavePassword = False
.SourceConnectionFile = ""
.ServerCredentialsMethod = xlCredentialsMethodIntegrated
.AlwaysUseConnectionFile = False
The Problem is, that the name of the string gets mistaken as Text. How can i change that?
Thanks in advance
Carvahall