Live-Forum - Die aktuellen Beiträge
Datum
Titel
28.03.2024 21:12:36
28.03.2024 18:31:49
Anzeige
Archiv - Navigation
704to708
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
704to708
704to708
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
Inhaltsverzeichnis

Sound ein/aus

Sound ein/aus
07.12.2005 11:24:40
Eule
Hallo Excelianer(innen)
hier zuerst mal meine Code:

Sub Abd1_BeiKlick()
ActiveSheet.Shapes("abd1").Visible = False
WAVStart
Play_PPS "a_meier.pps"
'WAVStop
End Sub

'''''''''''''''''''''''''
Beschreibung:
beim Klick auf ein Shape startet WAVStart (eine Melodie)
ein Powerpoint PPS wird gestartet
Problem:
wird das pps abgebrochen oder beendet, sollte eigentlich WAVStop (dummyMelodie) ablaufen.
Tuts aber nicht, obiges Makro läuft durch, mit der Konsequenz, das WAVStop gleich gestartet wird und somit WAVStart überhaupt nicht zu hören, da abgebrochen.
Wer weiß Rat?!!
hier noch die anderen Makros
'''''''''''''''''''''''''''''
Option Explicit
Declare

Function sndPlaySound32 Lib "winmm.dll" _
Alias "sndPlaySoundA" (ByVal lpszSoundName _
As String, ByVal uFlags As Long) As Long

Sub WAVStart()
Call sndPlaySound32(ThisWorkbook.Path & "\dalli.wav", 1)
End Sub


Sub WAVStop()
Call sndPlaySound32(ThisWorkbook.Path & "\sndrec.wav", 1)
End Sub

''''''''''''''''''''''
Option Explicit
Private Declare

Function GetShortPathName Lib "kernel32.dll" Alias "GetShortPathNameA" ( _
ByVal lpszLongPath As String, _
ByVal lpszShortPath As String, _
ByVal cchBuffer As Long) As Long
Private Declare 

Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
Private Declare 

Function GetActiveWindow Lib "user32.dll" () As Long
Private Const MAX_PATH = 260&
Private Const SW_MAXIMIZE = 3&
Public 

Sub Play_PPS(strFile As String)
Dim strPath As String, strShortPath As String
strPath = ThisWorkbook.Path & "\"
strShortPath = Space(MAX_PATH)
GetShortPathName strPath & strFile, strShortPath, MAX_PATH
strShortPath = Left$(strShortPath, InStr(1, strShortPath, vbNullChar) - 1)
ShellExecute GetActiveWindow, "open", strShortPath, "", strPath, SW_MAXIMIZE
End Sub

''''''''''''''''''''''''''

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Sound ein/aus
07.12.2005 12:08:33
Reinhard
Huhu *g,
google mal in Groups nach
CreateProcess waitforsingleobject
Gruß
Reinhard
ps:Das Forum lebt auch von Rückmeldungen
AW: Sound ein/aus
07.12.2005 12:32:56
Eule
Hi Reinhard
danke für deinen Link. Das Ganze bezieht sich jedoch auf VB. In VBA krieg ich's leider nicht gebacken.
Vielleicht weiß jemand mehr?!
Gruss Eule
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige