Dear All,
I'm currently trying to write a macro that will establish a connection with a database. I want to use this macro for a couple of hundred customer sheets that all need te same connection to the database but the connection should have a different customer filter for every sheet.
I need this filter because otherwise the pivottable would make the file too large.
Below you wil see the macro. The part where i use the MyInput in the query connection is this part:
Somehow when i try to use the makro with a different customer it returns the customer on which the macro was written. I don't understand why this happens!
Does anyone know?
Bookmarks