Link to home
Start Free TrialLog in
Avatar of Douglas Seyama
Douglas Seyama

asked on

How to close an excel file and a power BI file using VB.net application

I have a mini app coded in VB.net. Its function is to open an excel and power bi file by clicking buttons on a windows form and close it after using it . I can successful open the file by clicking the buttons . I'm kindly requesting anyone to help me with a code that I can use to close the excel file and the power BI file by clicking on different buttons.
Here is my code for opening the files:
Public Class Form1

    Private Sub OpenDashboards_Click(sender As Object, e As EventArgs) Handles OpenDashboards.Click
        System.Diagnostics.Process.Start("C:/Application/dashboard.pbix")
    End Sub

    Private Sub OpenTracker_Click(sender As Object, e As EventArgs) Handles OpenTracker.Click
        System.Diagnostics.Process.Start("C:/Application/tracker.xlsx")
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Me.Visible = False



    End Sub
End Class
ASKER CERTIFIED SOLUTION
Avatar of Misha
Misha
Flag of Russian Federation image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
There in no activity from author