Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

User form in PowerPoint to feed Excel spreadsheet

Status
Not open for further replies.

PCOwner

Technical User
Aug 1, 2019
3
US
I'd created a presentation/tutorial in MS PowerPoint, run it in a terminal mode, where users navigate through vba coded buttons. Now, I'm figuring a way to capture who views the PowerPoint (also, trying to capture their feedback). Could anyone please help with a vba code that could be tied to a userform in the beginning or the end of the presentation that would allow users to fill and submit the feedback/registrations? Could an embedded Excel w/VBA help with this?

Additional background info... as an admin, I upload 1 PP slide and it propagates to our public desktops in our classroom. Desktops are locked by the IT and there is no email client installed.

 
PCOwner said:
vba code that could be tied to a userform in the beginning or the end of the presentation

Is this the userform in PowerPoint presentation?
If so, you may try this.

[tt]btnSubmit[/tt] is a command button on your PP UserForm,

Code:
Option Explicit

Private Sub btnSubmit_Click()
Dim objExcel As Object

Me.MousePointer = vbHourglass

Set objExcel = CreateObject("Excel.Application")

With objExcel[green]
    '.Visible = True[/green]
    .Workbooks.Open FileName:=[red]"C:\TEMP\Test.xlsx"[/red]
    .Cells(1, 1).Value = [blue]"This is some text from PowerPoint presentation"[/blue]
    .ActiveWorkbook.Save
    .Quit
End With
Set objExcel = Nothing

Me.MousePointer = vbDefault

End Sub

---- Andy

There is a great need for a sarcasm font.
 
Alt+F11 opens the VBA Editor in Microsoft Office applications.

Ctrl+R opens the Project Explorer in the VBE.

RIGHT-click on the application object in the PE and you can choose to insert a Userform, Module or Class Module to house your code.

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
What are the possibilities to transfer feedback info? Is there a mapped network drive, with common letter? If so, you may use network file, excel or even text file, to collect data.

combo
 
Greetings guys,

Thank you for reaching out. Thank you, Andrzejek for the code. Yes userform is in PowerPoint. I used your code to a newly created form w/ 2 text boxes and 1 button, but when I run the code nothing happens. The user for pops up in the beginning (1st slide), but when I press a button to submit, nothing happens. Default location is C:\Users\Careers\Desktop
I do like the code, very close to getting us there.

Thank you, SkipVought for the shortcuts.

combo, no idea if there a way for the transfer on the shared drive. The public computers do not show any mapped drives and all the folders are locked out, but the Desktop. Users can save files on the Desktop. From my staff computer, I'm able to access one folder on the shared drive. That folder we use to push a file and it shows up on all the public PCs. These PC use Win 8.
 
What is the code you used?

What ends up in the Excel workbook?

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
Hello Skip,

I used the code by Andrzejek and a blank Excel spreadsheet.
 
So you're saying that NOTHING ends up in C:\TEMP\Test.xlsx after you run the procedure?

Skip,

[glasses]Just traded in my OLD subtlety...
for a NUance![tongue]

"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
AD1D550E-FCB5-4AB6-A3C8-1F86CACE2554_ne1bcz.jpg
 
In addition to Skip's question,
did you put any break points in your (my?) VBA code to make sure that you actually execute that code when you click "Submit" button?


---- Andy

There is a great need for a sarcasm font.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top