-
Oct 24th, 2007, 04:29 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] VB6/VBA - populate combo box in powerpoint presentation
Hello everyone,
I have a powerpoint presentation. On one of my slides, I would like to add a combo box. I would like to populate the combox box with some values.
Question1:
Where and how do I put in the vb or vba code in designing this presentation?
Question2:
How do I go about populating this combo box with my values?
Note: I want this combox box to be operational when I run the presentation.
This is a new gig for me, so a clear explanation will be much appreciated.
Thanks.
GiftX.
-
Oct 25th, 2007, 07:39 AM
#2
Re: VB6/VBA - populate combo box in powerpoint presentation
Where will the values becoming from? Are you using a database?
-
Oct 25th, 2007, 05:54 PM
#3
Re: VB6/VBA - populate combo box in powerpoint presentation
Just drop a combobox on to your slide and use code like below to popuate it with your desired items.. It will be functional during playback.
Code:
Option Explicit
Sub LoadMe()
ComboBox1.AddItem "Test1"
ComboBox1.AddItem "Test2"
ComboBox1.AddItem "Test3"
ComboBox1.AddItem "Test4"
ComboBox1.ListRows = 4
End Sub
Private Sub ComboBox1_GotFocus()
If ComboBox1.ListCount = 0 Then
LoadMe
End If
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Oct 26th, 2007, 03:42 PM
#4
Thread Starter
Hyperactive Member
Re: VB6/VBA - populate combo box in powerpoint presentation
Thanks guys. All your codes worked for me.
Have a great weekend you all.
GiftX.
-
Apr 30th, 2021, 05:31 AM
#5
New Member
Re: VB6/VBA - populate combo box in powerpoint presentation
Originally Posted by RobDog888
Just drop a combobox on to your slide and use code like below to popuate it with your desired items.. It will be functional during playback.
Code:
Option Explicit
Sub LoadMe()
ComboBox1.AddItem "Test1"
ComboBox1.AddItem "Test2"
ComboBox1.AddItem "Test3"
ComboBox1.AddItem "Test4"
ComboBox1.ListRows = 4
End Sub
Private Sub ComboBox1_GotFocus()
If ComboBox1.ListCount = 0 Then
LoadMe
End If
End Sub
Very old post But I want to ask again. How can we change this code to work during edit mode? Codes are working during presentation mode only.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|