PPT 2010, VBA help for newbie

Joined
Nov 13, 2011
Messages
1
Reaction score
0
Doing my best to learn VBA for powerpoint 2010, never really been good at it. I trying to create a code that will allow an object (Rectangle 1) to appear on the screen at a certain point. I have Commandbutton1 that causes a text box to count on each click, up to 5. Once 5 is reached I want the Rectangle 1 to appear but must not be visible till then and must dissappear once Commandbutton2 is pressed. Here is what I have so far:
Private mintCounter As Integer ' module level variable
Private Sub CommandButton1_Click()
mintCounter = mintCounter + 1
If mintCounter <= 5 Then
TextBox1.Text = CStr(mintCounter) If mintCounter = 5 Then
' insert some code to show items on the screen
End If
Else
' the counter exceeds the limit,
' insert some code to handle this situation
End If
End Sub

Private Sub CommandButton2_Click()
'reset the counter
mintCounter = 0
TextBox1.Text = CStr(mintCounter)
End Sub

So this is where I am stuck, anyone?:cry:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

PowerPoint Help needed with VB 1
VISIO from Excel VBA 0
Using VBA to trigger a certain slide 0
Acess 2010 0
VBA - combinations 0
wrong font 4
Charts in VBA 0
Two types of textbox input 1

Top