web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Data refresh error exc...
Power Apps
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

 

 

Categories:
I have the same question (0)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 404

#2
timl Profile Picture

timl 344 Super User 2026 Season 1

#3
WarrenBelz Profile Picture

WarrenBelz 320 Most Valuable Professional

Last 30 days Overall leaderboard