wie muss das Makro sein, wenn aus mehreren Makros ein Makro gemacht wird?
Wäre schön, wenn mir da geholfen werden könnte. Anbei meine Datei mit den bisherigen Makros.
Mit Gruß,
Dieter(Drummer)
https://www.herber.de/bbs/user/107184.xlsm
Sub farbe_gruen()
Dim objSpeaker As Object, x&
Set objSpeaker = CreateObject("SAPI.SpVoice")
objSpeaker.Volume = 100
For x = 5 To 5
objSpeaker.Speak Range("BA" & x)
Next
ActiveSheet.Unprotect
With Selection.Interior
.ColorIndex = ActiveSheet.Shapes(Application.Caller).AlternativeText
End With
ActiveSheet.Protect
End Sub
Sub farbe_diverse()
Dim objSpeaker As Object, x&
Set objSpeaker = CreateObject("SAPI.SpVoice")
objSpeaker.Volume = 100
For x = 5 To 5
objSpeaker.Speak Range("BA" & x)
Next
ActiveSheet.Unprotect
With Selection.Interior
.ColorIndex = ActiveSheet.Shapes(Application.Caller).AlternativeText
End With
ActiveSheet.Protect
End Sub
Sub farbe_diverse()
Dim objSpeaker As Object, x&
Set objSpeaker = CreateObject("SAPI.SpVoice")
objSpeaker.Volume = 100
For x = 5 To 5
objSpeaker.Speak Range("BA" & x)
Next
ActiveSheet.Unprotect
With Selection.Interior
.Color = ActiveSheet.Shapes(Application.Caller).Fill.ForeColor '.AlternativeText
End With
ActiveSheet.Protect
End Sub
Option Explicit
Sub farbe_Shapes()
Dim objSpeaker As Object, x&
Set objSpeaker = CreateObject("SAPI.SpVoice")
objSpeaker.Volume = 100
Select Case ActiveSheet.Shapes(Application.Caller).AlternativeText
Case Is = 6 'gelb
x = 4 'Zelle("F4")
Case Is = 3 'rot
x = 3 'Zelle("F3")
Case Is = 4 'grün
x = 5 'Zelle("F5")
Case Is = 5 'blau
x = 6 'Zelle("F6")
Case Is = 15 'grau
x = 7 'Zelle("F7")
Case Is = -4142
x = 8 'Zelle("F8")
Case Is = False 'Farbknopftext
x = 9 'Zelle("F9")
End Select
objSpeaker.Speak Range("F" & x)
ActiveSheet.Unprotect
With Selection.Interior
.ColorIndex = ActiveSheet.Shapes(Application.Caller).AlternativeText
End With
ActiveSheet.Protect
End Sub
Hier die Datei: