kansasmlb
11-18-2007, 03:29 PM
I am trying to query Access from Excel using VBA. I am getting a compile error that says Named Argument not found. Below is the code I am using. Any help would be great...i am totally stuck.
thanks.
Dim db As Database
Dim Qd As QueryDef
Dim rs As Recordset
Dim Ws As Object
Dim i As Integer
Dim Path As String
Path = "H:\PJM_FTR_Pricing\Pricing_FTR_TCR_1.mdb"
Set Ws = Sheets("Results")
Ws.Activate
Range("A1").Activate
Range("Pricing_FTR_TCR_1").Select
Selection.ClearContents
(***THIS IS WHERE THE ERROR RESIDES - SPECIFICALLY WITH EXCLUSIVE:=FALSE***))
Set db = Workspaces(0).OpenDatabase(Path, ReadOnly:=True, _
Exclusive:=False)
thanks.
Dim db As Database
Dim Qd As QueryDef
Dim rs As Recordset
Dim Ws As Object
Dim i As Integer
Dim Path As String
Path = "H:\PJM_FTR_Pricing\Pricing_FTR_TCR_1.mdb"
Set Ws = Sheets("Results")
Ws.Activate
Range("A1").Activate
Range("Pricing_FTR_TCR_1").Select
Selection.ClearContents
(***THIS IS WHERE THE ERROR RESIDES - SPECIFICALLY WITH EXCLUSIVE:=FALSE***))
Set db = Workspaces(0).OpenDatabase(Path, ReadOnly:=True, _
Exclusive:=False)