Link to home
Start Free TrialLog in
Avatar of amy_goe
amy_goe

asked on

Open Ole Object with VBA in front of the Excel Window

I have an excel spreadsheet with a video that is embeded as an OleObject.  I have code set on a button to open/activate the video. The code works fine except that sometimes the video opens in front of the excel window (as I want it to)  and sometimes it opens behind the window.  Is there code I can use to specify that it should open in front?

The code I have now is just:

Private Sub CommandButton2_Click()

Me.OLEObjects("Video").Activate

End Sub
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amy_goe
amy_goe

ASKER

That's seems to have done it.  Thank  you!!