Vba code: Power point to Excel Userform

Jose11

New Member
Joined
Feb 1, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi :)

I'm an amateur VBA programmer and I'm struggling to finish some code to make a Powerpoint presentation jump back to an excel spreadsheet.

VBA Code:
Private Sub START_Click()


Dim xlApp As Object
Dim xlWorkBook As Object

Set xlApp = CreateObject("Excel.Application")

xlApp.Visible = True
Set xlWorkBook = xlApp.Workbooks.Open("D:\GONGUES\PROJECTS - Joe info\HAC\HAC.xlsm", True, False)

With Workbooks("D:\GONGUES\PROJECTS - Joe info\HAC\HAC.xlsm")
UserForm3.Show
End With
    

Set xlApp = Nothing
Set xlWorkBook = Nothing

End Sub

Basically, I want to open a userform after I press a button at the end of my presentation in PowerPoint.
If I remove the "with..." part of the code I can get my excel file open, now I just need to get the userform loaded as well... any tips?
Cheers,
Jose
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
One easy thing you can do is to call the UserForm in the workbook open event.

VBA Code:
Private Sub Workbook_Open()
    UserForm3.Show
End Sub
So the UserForm is automatically loaded and shown each time the workbook is opend from PowerPoint or otherwise.
 
Upvote 0

Forum statistics

Threads
1,216,735
Messages
6,132,423
Members
449,727
Latest member
Aby2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top