Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
rafaelschmitz
New Member

Error opening a power bi desktop file using VBA

Hi All,

 

I'm trying to open a pbix file through a VBA code file after updating an excel database. I used the following commands in VBA:

 

MyFile = "filepath"
Cmd = "RunDLL32.EXE shell32.dll,ShellExec_RunDLL "
Shell (Cmd & MyFile)

 

But when it does that, Power BI starts with a error message that says: "Ribbon view has not been initialized"

 

Do you have any idea why I'm having this error? Is it the method I'm using to open the file? Do you know another way to do it?

 

Thanks,

1 REPLY 1
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @rafaelschmitz,

Due to I could not reproduce your problem, I suggest you ask the problem in below link:

https://github.com/dubravcik/PBIXRefresher

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors