Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Dale Matthews   on Feb 17 In MS Office Category.

  
Question Answered By: Barabas Cohen   on Feb 17

Yes, I should have been more precise. :-)

It's when it reaches the .Commandtext that I get Run-time
Error '1004'. The OldQueryString and NewQueryString are
correctly "populated" with a simple SQL statement.

DBFile = ThisWorkbook.Path & "\CPHNK Måluppföljning.mdb"
Constring = "ODBC;DSN=MS Access Database; DBQ=" & DBFile

NewString = SELECT * FROM Output2007
OldString = ActiveWorkbook.PivotCaches(1).CommandText

With PTCache
.Connection = Constring
.CommandText = Replace(PTCache.CommandText, OldString,
NewString)
End With

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on re-directing pivotcache based on user input Or get search suggestion and latest updates.


Tagged: