I have a big Automation process project using Vba and Power BI.
My question:
Is it possible to refresh your Power BI File using a macro?
Thanks!
In theory - yes, in practice - no (at least it isn't recommended).
You can refresh a dataset in Power BI Service using Refres Dataset and Refresh Dataset In Group REST API calls. In general it is possible to make web service calls in VBA and should be possible to authenticate and acquire access token (required to use Power BI REST API), it looks much more manageable and easy to implement if you write this code in a .NET asspebly and call it from your VBA code, or to call a PowerShell script, than writing and dedubing VBA. You wont find any working samples, because nobody does it this way. I also think that from security perspective it is very bad idea.
You should reconsider redesigning your automation process.