Forum Discussion
Jean Robert
Jul 13, 2018Copper Contributor
VBA Refresh Connections : Error 1004 Application-defined or object-defined error
I have a report using Power Query and Power Pivot, that is refreshed using VBA. It worked well for several years ,and since last week the VBA stops in Debug mode on the Refresh method of the connecti...
JKPieterse
Jul 13, 2018Silver Contributor
If you want us to help, show the code.
- velu13579Nov 27, 2020Copper ContributorSheets("CONSOLIDAT").Cells.ClearContents
col = Application.WorksheetFunction.CountA(Range("A3", Range("A3").End(xlToRight)))
Row = Application.WorksheetFunction.CountA(Range("A3", Range("A3").End(xlDown)))
Sheets("BOA").Activate
Sheets("BOA").Range("b2:H2").Copy
Sheets("CONSOLIDAT").Range("A1:E1").PasteSpecial xlPasteValues
Sheets("BOA").Select
Sheets("BOA").Range("b3").Select
Sheets("BOA").Range("b3", Cells(Row, col)).Select