Chris Macro
08-06-2014, 07:33 AM
I know that in PowerPoint VBA there is now such thing as ThisPresentation. I need to set a variable however the presentation the VBA code is stored to. I have been able to do this by using the file name, for example I could write:
Set ThisPresentation = Presentations("Custom Macros.pptm")
However if I try to do this with an add-in file it doesn't seem to work, for example I tried:
Set ThisPresentation = Presentations("Custom Macros.ppam")
Are there any other ways to set a variable to the add-in file in PowerPoint? I am trying to create a userform add-in that can variably updated listbox that eventually populates an Array. My problem is that I want the userform to remember the listbox items after PowerPoint is closed so next time you don't have to re-enter the items in the listbox. I was accomplishing this by having VBA rewrite its own code.
Set ThisPresentation = Presentations("Custom Macros.pptm")
However if I try to do this with an add-in file it doesn't seem to work, for example I tried:
Set ThisPresentation = Presentations("Custom Macros.ppam")
Are there any other ways to set a variable to the add-in file in PowerPoint? I am trying to create a userform add-in that can variably updated listbox that eventually populates an Array. My problem is that I want the userform to remember the listbox items after PowerPoint is closed so next time you don't have to re-enter the items in the listbox. I was accomplishing this by having VBA rewrite its own code.