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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard