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:
 
Back
Top