PC Review


Reply
Thread Tools Rate Thread

PPT 2010, VBA help for newbie

 
 
New Member
Join Date: Nov 2011
Posts: 1
 
      13th Nov 2011
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PPT 2003 copying images out of PPT to another PPT-loss of quality Lily Microsoft Powerpoint 4 23rd Sep 2008 11:28 AM
ppt 07 VBA compatability with ppt 03 Tom Conrad Microsoft Powerpoint 1 18th Jul 2008 12:32 AM
(VBA in PPt file) Updating links on opening ppt file pm Microsoft Powerpoint 2 7th Jan 2006 05:54 PM
PPT VBA: How to get "grandparent" group? (PPT crashes) Gary McGill Microsoft Powerpoint 2 26th Oct 2005 11:34 AM
Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! Help! -$- Windows XP Internet Explorer 2 21st Dec 2003 11:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:52 AM.