Clearing ComboBox in Power point

Hi All,
I have two ComboBox in a macro-enabled powerpoint presentation. These Combobox represent a start-date and an end-date. The following piece of code clears the combobox, but not if the presentation opens with dates already present. So let's say you open the power point presentation, and the dates from when the presentation was previously given were still in the Combobox, if I try to apply this code...nothing happens. But if I adjust the dates in the combo box and apply the code again, it works and the combobox's are cleared. Strange! Any ideas?
Dim j As Long
Dim cb As Object

For j = 1 To 2
Set cb = Slide1.Shapes("ComboBox" & j).OLEFormat.Object
cb.Clear
Next j

'Clean up
 Set cb = Nothing

I am aware it is possible to clear these combo box by utilising the above with  PresentationOpen(ByVal Pres As Presentation) , but this requires an add-in. Is it possible to do this without an add-in? If so, how? Associate it with another event?
tom yAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
Hi,

pls try
Dim j As Long
Dim cb As Object

For j = 1 To 2
Set cb = Slide1.Shapes("ComboBox" & j).OLEFormat.Object
cb.Value = ""
Next j

'Clean up
 Set cb = Nothing

Open in new window


Regards
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tom yAuthor Commented:
worked like a dream...D'oh. Should have thought of that!
0
tom yAuthor Commented:
Possibly we should use vbNullString instead of ""
0
Rgonzo1971Commented:
If you prefer, it should work as well
0
tom yAuthor Commented:
It does, cheers
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft PowerPoint

From novice to tech pro — start learning today.