Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Unanswered

Data refresh error excel connections SQL query

(0) ShareShare
ReportReport
Posted on by

hello experts, i know this is not related to power platfrom, but i really need some experts help with my issue.

 

I have created connection in excel using SQL query, and i have dynamic query in my Excel Cell (this will be dynamic and will be updated based on the slicer options i created).

 

all i just wants to run the query based on the dynamic query refers from excel cell. below is the VBA code i used to refer the query and refresh the connection to run. But i get some run-time error "Application-defined or object-defined error" code runs correctly till the line "Sheet1.Select", but it throws error while executing the yellow highlighted line.

 

Prabhu_Rajaram_0-1674622304133.png

 

CodeString = picks the updated query from Sheet2.Range("A1")

 

Below is the code from Sheet2, this is dynamic, will be changed as required.

Prabhu_Rajaram_1-1674622577511.png

 

 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Query

#1
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 7

#3
SD-13050734-0 Profile Picture

SD-13050734-0 6

Overall leaderboard

Featured topics