运行完成视频并移至下一张表

时间:2019-12-23 08:19:10

标签: excel vba

如何编写在自动完成后自动运行视频的VBA视频代码。

 Sub NextMediaFile()
    Dim Folder As String
    Dim StartCell As String
    Sheet1.WindowsMediaPlayer1.Visible = True
    ' Move to the next song/video
    ActiveCell.Offset(1, 0).Select
    StartCell = "A4"
    Folder = Sheet1.Range(StartCell).Offset(-1, 0).Value
    ' If the ActiveCell is empty go to the start of the media files
    If Len(ActiveCell.Value) = 0 Then
    Laylink
    Sheet1.Range(StartCell).Select
    Sheet1.WindowsMediaPlayer1.URL = Folder & ActiveCell.Value
    End If
End Sub

0 个答案:

没有答案