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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PPT VBA - Assign text box value to variable

Status
Not open for further replies.

Jelizabug

Technical User
Mar 17, 2013
1
US
Hi there,

I'm fairly new to VBA, so I am not sure this is possible, but it seems like it should be... I am working on a Jeopardy project. I found a free template with scoring online, but there was no Final Jeopardy option, so I've been trying to code that in. The other scoring is fairly straightfoward - objects have been assigned macros which add 100, 200, or 300 points to the score variable.

For Final Jeopardy, the competitor (there's only one, so no need to worry about multiple teams for this) needs to be able to enter any point value. I created an ActiveX texbox control named "wager" in which this value could be input. I have defined a variable (Dim finalwager as long) for the final wager output. The issue is that I can't seem to find the right code to assign the value in the wager input box to finalwager.

I have a sample of the presentation if that would be helpful to anyone. It's a last-minute project, and the game is March 18 (tomorrow, joy) - I've been researching this problem for 3 days now with no luck. Thanks in advance for any assistance.
 
Hi,

You should have an application object, a slide object and a shape object in the object hierarchy.

Use the Watch Window to help you discover these object references.

faq707-4594

Generally, something like this, BUT verify using watch window...
Code:
Finalwager = pptObject.Slides(x).Shapes(y).oleobject.object.text

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top