joshuafournier
Board Regular
- Joined
- Mar 3, 2012
- Messages
- 91
Good Morning,
I am trying to write a code to Open Windows media player, play an .mp4 in fullscreen. The below code works perfect for a single file (substituting the .mp4 with the file name). I have many buttons with videos and need to click different buttons to watch different videos.
what I would like is to have the macro to just loop through every .mp4 in the folder.....looked around and tried many changes.... any help would be appreciated!
Thank You
I am trying to write a code to Open Windows media player, play an .mp4 in fullscreen. The below code works perfect for a single file (substituting the .mp4 with the file name). I have many buttons with videos and need to click different buttons to watch different videos.
what I would like is to have the macro to just loop through every .mp4 in the folder.....looked around and tried many changes.... any help would be appreciated!
Thank You
VBA Code:
Private Sub CommandButton1_Click()
FileToPlay = """H:\02 Images\Drone Mini3 Pro\*.mp4"""
Shell "C:\Program Files\Windows Media Player\wmplayer /play /fullscreen " & FileToPlay
End Sub