
Sub CicloConMatriceValori()
If Sheets("GIOCO").Range("AB47") = 1 Then MsgBox "Scelte errate!": Exit Sub
Const sIntRngOrig As String = "G6:G12"
Const sIntRngDest As String = "C6:C12"
Dim Wb As Workbook
Dim Ws As Worksheet
Dim IntRngOrig As Range
Dim IntRngDest As Range
Dim arrValori() As Variant
Dim i As Integer, i2 As Integer
Dim IndiceRiferimento As Integer
Dim Valore1, Valore2, Valore3, Valore4, Valore5, Valore6
Set Wb = ThisWorkbook
'<--- disabilito lo schermo, gli eventi e imposto il calcolo in manuale --->
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
With Wb
'<--- memorizzo i valori presenti in G6:G12 in una matrice --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngOrig = .Range(sIntRngOrig)
With IntRngOrig
For i = 1 To .Rows.Count
i2 = i2 + 1
ReDim Preserve arrValori(1 To i2)
arrValori(i2) = .Cells(i, 1).Value
Next i
End With
End If
End With
Next Ws
'<--- riporto i valori memorizzati nella precedente matrice nelle celle C6:C12 --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngDest = .Range(sIntRngDest)
With IntRngDest
For i = 1 To .Rows.Count
i2 = i2 + 1
.Cells(i, 1).Value = arrValori(i2)
Next i
End With
End If
End With
Next Ws
'<--- fine trasferimento in matrice / inizio conteggio macro in (I.A) CELLA AB49 --->
With .Sheets("(I.A)")
If .Range("AE49") = 7 Then
.Range("AE49") = 1
.Range("W48:AB53") = Empty
Else
.Range("AE49") = .Range("AE49") + 1
End If
IndiceRiferimento = .Range("AE49").Value '<--- 1,2,3,4,5,6,7
Valore1 = Wb.Sheets("GIOCO").Range("H21").Value
Valore2 = .Range("Q3").Value
Valore3 = Wb.Sheets("GIOCO").Range("H20").Value
Valore4 = .Range("Q2").Value
Valore5 = Wb.Sheets("GIOCO").Range("H19").Value
Valore6 = .Range("Q1").Value
Select Case IndiceRiferimento
Case 1
.Range("V48") = Valore1
.Range("V49") = Valore2
.Range("V50") = Valore3
.Range("V51") = Valore4
.Range("V52") = Valore5
.Range("V53") = Valore6
Case 2
.Range("W48") = Valore1
.Range("W49") = Valore2
.Range("W50") = Valore3
.Range("W51") = Valore4
.Range("W52") = Valore5
.Range("W53") = Valore6
Case 3
.Range("X48") = Valore1
.Range("X49") = Valore2
.Range("X50") = Valore3
.Range("X51") = Valore4
.Range("X52") = Valore5
.Range("X53") = Valore6
Case 4
.Range("Y48") = Valore1
.Range("Y49") = Valore2
.Range("Y50") = Valore3
.Range("Y51") = Valore4
.Range("Y52") = Valore5
.Range("Y53") = Valore6
Case 5
.Range("Z48") = Valore1
.Range("Z49") = Valore2
.Range("Z50") = Valore3
.Range("Z51") = Valore4
.Range("Z52") = Valore5
.Range("Z53") = Valore6
Case 6
.Range("AA48") = Valore1
.Range("AA49") = Valore2
.Range("AA50") = Valore3
.Range("AA51") = Valore4
.Range("AA52") = Valore5
.Range("AA53") = Valore6
Case 7
.Range("AB48") = Valore1
.Range("AB49") = Valore2
.Range("AB50") = Valore3
.Range("AB51") = Valore4
.Range("AB52") = Valore5
.Range("AB53") = Valore6
End Select
End With
MsgBox "Fatto!"
End With
'<--- riattivo lo schermo, gli eventi e imposto nuovamente il calcolo in automatico --->
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End Sub
|
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Sub PlaySound()
If Application.CanPlaySounds Then
'Substitute the path and filename of the sound you want to play
Call sndPlaySound32("Musica de Suspense Terror - Requiem For Dream.mp3", 0)
End If |
Sub CicloConMatriceValori()
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
If Application.CanPlaySounds Then
'Substitute the path and filename of the sound you want to play
Call sndPlaySound32("F:GIOCOLA BATTAGLIA DEI POTENTI1.mp3", 0)
If Sheets("GIOCO").Range("AB47") = 1 Then MsgBox "Scelte errate!": Exit Sub
Const sIntRngOrig As String = "G6:G12"
Const sIntRngDest As String = "C6:C12"
Dim Wb As Workbook
Dim Ws As Worksheet
Dim IntRngOrig As Range
Dim IntRngDest As Range
Dim arrValori() As Variant
Dim i As Integer, i2 As Integer
Dim IndiceRiferimento As Integer
Dim Valore1, Valore2, Valore3, Valore4, Valore5, Valore6
Set Wb = ThisWorkbook
'<--- disabilito lo schermo, gli eventi e imposto il calcolo in manuale --->
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
With Wb
'<--- memorizzo i valori presenti in G6:G12 in una matrice --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngOrig = .Range(sIntRngOrig)
With IntRngOrig
For i = 1 To .Rows.Count
i2 = i2 + 1
ReDim Preserve arrValori(1 To i2)
arrValori(i2) = .Cells(i, 1).Value
Next i
End With
End If
End With
Next Ws
'<--- riporto i valori memorizzati nella precedente matrice nelle celle C6:C12 --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngDest = .Range(sIntRngDest)
With IntRngDest
For i = 1 To .Rows.Count
i2 = i2 + 1
.Cells(i, 1).Value = arrValori(i2)
Next i
End With
End If
End With
Next Ws
'<--- fine trasferimento in matrice / inizio conteggio macro in (I.A) CELLA AB49 --->
With .Sheets("(I.A)")
If .Range("AE49") = 7 Then
.Range("AE49") = 1
.Range("W48:AB53") = Empty
Else
.Range("AE49") = .Range("AE49") + 1
End If
IndiceRiferimento = .Range("AE49").Value '<--- 1,2,3,4,5,6,7
Valore1 = Wb.Sheets("GIOCO").Range("H21").Value
Valore2 = .Range("Q3").Value
Valore3 = Wb.Sheets("GIOCO").Range("H20").Value
Valore4 = .Range("Q2").Value
Valore5 = Wb.Sheets("GIOCO").Range("H19").Value
Valore6 = .Range("Q1").Value
Select Case IndiceRiferimento
Case 1
.Range("V48") = Valore1
.Range("V49") = Valore2
.Range("V50") = Valore3
.Range("V51") = Valore4
.Range("V52") = Valore5
.Range("V53") = Valore6
Case 2
.Range("W48") = Valore1
.Range("W49") = Valore2
.Range("W50") = Valore3
.Range("W51") = Valore4
.Range("W52") = Valore5
.Range("W53") = Valore6
Case 3
.Range("X48") = Valore1
.Range("X49") = Valore2
.Range("X50") = Valore3
.Range("X51") = Valore4
.Range("X52") = Valore5
.Range("X53") = Valore6
Case 4
.Range("Y48") = Valore1
.Range("Y49") = Valore2
.Range("Y50") = Valore3
.Range("Y51") = Valore4
.Range("Y52") = Valore5
.Range("Y53") = Valore6
Case 5
.Range("Z48") = Valore1
.Range("Z49") = Valore2
.Range("Z50") = Valore3
.Range("Z51") = Valore4
.Range("Z52") = Valore5
.Range("Z53") = Valore6
Case 6
.Range("AA48") = Valore1
.Range("AA49") = Valore2
.Range("AA50") = Valore3
.Range("AA51") = Valore4
.Range("AA52") = Valore5
.Range("AA53") = Valore6
Case 7
.Range("AB48") = Valore1
.Range("AB49") = Valore2
.Range("AB50") = Valore3
.Range("AB51") = Valore4
.Range("AB52") = Valore5
.Range("AB53") = Valore6
End Select
End With
MsgBox "Fatto!"
End With
'<--- riattivo lo schermo, gli eventi e imposto nuovamente il calcolo in automatico --->
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End Sub |
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Sub CicloConMatriceValori()
If Application.CanPlaySounds Then
Call sndPlaySound32("F:GIOCOLA BATTAGLIA DEI POTENTI1.mp3", 0)
........
|
Option Explicit
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Sub CicloConMatriceValori()
If Application.CanPlaySounds Then
Call sndPlaySound32("F:GIOCOLA BATTAGLIA DEI POTENTI1.mp3", 0)
If Sheets("GIOCO").Range("AB47") = 1 Then MsgBox "Scelte errate!": Exit Sub
Const sIntRngOrig As String = "G6:G12"
Const sIntRngDest As String = "C6:C12"
Dim Wb As Workbook
Dim Ws As Worksheet
Dim IntRngOrig As Range
Dim IntRngDest As Range
Dim arrValori() As Variant
Dim i As Integer, i2 As Integer
Dim IndiceRiferimento As Integer
Dim Valore1, Valore2, Valore3, Valore4, Valore5, Valore6
Set Wb = ThisWorkbook
'<--- disabilito lo schermo, gli eventi e imposto il calcolo in manuale --->
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
With Wb
'<--- memorizzo i valori presenti in G6:G12 in una matrice --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngOrig = .Range(sIntRngOrig)
With IntRngOrig
For i = 1 To .Rows.Count
i2 = i2 + 1
ReDim Preserve arrValori(1 To i2)
arrValori(i2) = .Cells(i, 1).Value
Next i
End With
End If
End With
Next Ws
'<--- riporto i valori memorizzati nella precedente matrice nelle celle C6:C12 --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngDest = .Range(sIntRngDest)
With IntRngDest
For i = 1 To .Rows.Count
i2 = i2 + 1
.Cells(i, 1).Value = arrValori(i2)
Next i
End With
End If
End With
Next Ws
'<--- fine trasferimento in matrice / inizio conteggio macro in (I.A) CELLA AB49 --->
With .Sheets("(I.A)")
If .Range("AE49") = 7 Then
.Range("AE49") = 1
.Range("W48:AB53") = Empty
Else
.Range("AE49") = .Range("AE49") + 1
End If
IndiceRiferimento = .Range("AE49").Value '<--- 1,2,3,4,5,6,7
Valore1 = Wb.Sheets("GIOCO").Range("H21").Value
Valore2 = .Range("Q3").Value
Valore3 = Wb.Sheets("GIOCO").Range("H20").Value
Valore4 = .Range("Q2").Value
Valore5 = Wb.Sheets("GIOCO").Range("H19").Value
Valore6 = .Range("Q1").Value
Select Case IndiceRiferimento
Case 1
.Range("V48") = Valore1
.Range("V49") = Valore2
.Range("V50") = Valore3
.Range("V51") = Valore4
.Range("V52") = Valore5
.Range("V53") = Valore6
Case 2
.Range("W48") = Valore1
.Range("W49") = Valore2
.Range("W50") = Valore3
.Range("W51") = Valore4
.Range("W52") = Valore5
.Range("W53") = Valore6
Case 3
.Range("X48") = Valore1
.Range("X49") = Valore2
.Range("X50") = Valore3
.Range("X51") = Valore4
.Range("X52") = Valore5
.Range("X53") = Valore6
Case 4
.Range("Y48") = Valore1
.Range("Y49") = Valore2
.Range("Y50") = Valore3
.Range("Y51") = Valore4
.Range("Y52") = Valore5
.Range("Y53") = Valore6
Case 5
.Range("Z48") = Valore1
.Range("Z49") = Valore2
.Range("Z50") = Valore3
.Range("Z51") = Valore4
.Range("Z52") = Valore5
.Range("Z53") = Valore6
Case 6
.Range("AA48") = Valore1
.Range("AA49") = Valore2
.Range("AA50") = Valore3
.Range("AA51") = Valore4
.Range("AA52") = Valore5
.Range("AA53") = Valore6
Case 7
.Range("AB48") = Valore1
.Range("AB49") = Valore2
.Range("AB50") = Valore3
.Range("AB51") = Valore4
.Range("AB52") = Valore5
.Range("AB53") = Valore6
End Select
End With
MsgBox "Fatto!"
End With
'<--- riattivo lo schermo, gli eventi e imposto nuovamente il calcolo in automatico --->
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End If
End Sub
|
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As Any, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Dim song As String
Sub PlayOn() ' start
song = "F:GIOCOLA BATTAGLIA DEI POTENTI1.mp3"
Call PlaySong(True)
End Sub
Sub PlayOff() ' stop
Call PlaySong(False)
End Sub
Private Sub PlaySong(Play As Boolean)
On Error Resume Next
Call mciSendString("Stop MPFE", 0&, 0, 0)
Call mciSendString("Close MPFE", 0&, 0, 0)
If Not Play Then Exit Sub
Call mciSendString("Open " & song & " Alias MPFE", 0&, 0, 0)
Call mciSendString("play MPFE from " & Reprise, 0&, 0, 0)
End Sub |
Option Explicit
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As Any, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Dim song As String
Sub PlayOn() ' start
song = "F:GIOCOLA BATTAGLIA DEI POTENTI1.mp3"
Call PlaySong(True)
End Sub
Sub PlayOff() ' stop
Call PlaySong(False)
End Sub
Private Sub PlaySong(Play As Boolean)
On Error Resume Next
Call mciSendString("Stop MPFE", 0&, 0, 0)
Call mciSendString("Close MPFE", 0&, 0, 0)
If Not Play Then Exit Sub
Call mciSendString("Open " & song & " Alias MPFE", 0&, 0, 0)
Call mciSendString("play MPFE from " & Reprise, 0&, 0, 0)
End Sub
If Sheets("GIOCO").Range("AB47") = 1 Then MsgBox "Scelte errate!": Exit Sub
Const sIntRngOrig As String = "G6:G12"
Const sIntRngDest As String = "C6:C12"
Dim Wb As Workbook
Dim Ws As Worksheet
Dim IntRngOrig As Range
Dim IntRngDest As Range
Dim arrValori() As Variant
Dim i As Integer, i2 As Integer
Dim IndiceRiferimento As Integer
Dim Valore1, Valore2, Valore3, Valore4, Valore5, Valore6
Set Wb = ThisWorkbook
'<--- disabilito lo schermo, gli eventi e imposto il calcolo in manuale --->
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
With Wb
'<--- memorizzo i valori presenti in G6:G12 in una matrice --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngOrig = .Range(sIntRngOrig)
With IntRngOrig
For i = 1 To .Rows.Count
i2 = i2 + 1
ReDim Preserve arrValori(1 To i2)
arrValori(i2) = .Cells(i, 1).Value
Next i
End With
End If
End With
Next Ws
'<--- riporto i valori memorizzati nella precedente matrice nelle celle C6:C12 --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngDest = .Range(sIntRngDest)
With IntRngDest
For i = 1 To .Rows.Count
i2 = i2 + 1
.Cells(i, 1).Value = arrValori(i2)
Next i
End With
End If
End With
Next Ws
'<--- fine trasferimento in matrice / inizio conteggio macro in (I.A) CELLA AB49 --->
With .Sheets("(I.A)")
If .Range("AE49") = 7 Then
.Range("AE49") = 1
.Range("W48:AB53") = Empty
Else
.Range("AE49") = .Range("AE49") + 1
End If
IndiceRiferimento = .Range("AE49").Value '<--- 1,2,3,4,5,6,7
Valore1 = Wb.Sheets("GIOCO").Range("H21").Value
Valore2 = .Range("Q3").Value
Valore3 = Wb.Sheets("GIOCO").Range("H20").Value
Valore4 = .Range("Q2").Value
Valore5 = Wb.Sheets("GIOCO").Range("H19").Value
Valore6 = .Range("Q1").Value
Select Case IndiceRiferimento
Case 1
.Range("V48") = Valore1
.Range("V49") = Valore2
.Range("V50") = Valore3
.Range("V51") = Valore4
.Range("V52") = Valore5
.Range("V53") = Valore6
Case 2
.Range("W48") = Valore1
.Range("W49") = Valore2
.Range("W50") = Valore3
.Range("W51") = Valore4
.Range("W52") = Valore5
.Range("W53") = Valore6
Case 3
.Range("X48") = Valore1
.Range("X49") = Valore2
.Range("X50") = Valore3
.Range("X51") = Valore4
.Range("X52") = Valore5
.Range("X53") = Valore6
Case 4
.Range("Y48") = Valore1
.Range("Y49") = Valore2
.Range("Y50") = Valore3
.Range("Y51") = Valore4
.Range("Y52") = Valore5
.Range("Y53") = Valore6
Case 5
.Range("Z48") = Valore1
.Range("Z49") = Valore2
.Range("Z50") = Valore3
.Range("Z51") = Valore4
.Range("Z52") = Valore5
.Range("Z53") = Valore6
Case 6
.Range("AA48") = Valore1
.Range("AA49") = Valore2
.Range("AA50") = Valore3
.Range("AA51") = Valore4
.Range("AA52") = Valore5
.Range("AA53") = Valore6
Case 7
.Range("AB48") = Valore1
.Range("AB49") = Valore2
.Range("AB50") = Valore3
.Range("AB51") = Valore4
.Range("AB52") = Valore5
.Range("AB53") = Valore6
End Select
End With
MsgBox "Fatto!"
End With
'<--- riattivo lo schermo, gli eventi e imposto nuovamente il calcolo in automatico --->
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End If
End Sub
|
Declare Function mciSendString Lib "winmm" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As Any, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Dim song As String
Sub CicloConMatriceValori()
If Sheets("GIOCO").Range("AB47") = 1 Then MsgBox "Scelte errate!": Exit Sub
song = "F:GIOCOLA BATTAGLIA DEI POTENTI1.mp3"
Call PlaySong(True)
Const sIntRngOrig As String = "G6:G12"
Const sIntRngDest As String = "C6:C12"
Dim Wb As Workbook
Dim Ws As Worksheet
Dim IntRngOrig As Range
Dim IntRngDest As Range
Dim arrValori() As Variant
Dim i As Integer, i2 As Integer
Dim IndiceRiferimento As Integer
Dim Valore1, Valore2, Valore3, Valore4, Valore5, Valore6
Set Wb = ThisWorkbook
'<--- disabilito lo schermo, gli eventi e imposto il calcolo in manuale --->
With Application
.ScreenUpdating = False
.EnableEvents = False
.Calculation = xlCalculationManual
End With
With Wb
'<--- memorizzo i valori presenti in G6:G12 in una matrice --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngOrig = .Range(sIntRngOrig)
With IntRngOrig
For i = 1 To .Rows.Count
i2 = i2 + 1
ReDim Preserve arrValori(1 To i2)
arrValori(i2) = .Cells(i, 1).Value
Next i
End With
End If
End With
Next Ws
'<--- riporto i valori memorizzati nella precedente matrice nelle celle C6:C12 --->
i2 = 0
For Each Ws In .Worksheets
With Ws
If .Name <> "GIOCO" And .Name <> "(I.A)" And .Name <> "NOTE" Then
Set IntRngDest = .Range(sIntRngDest)
With IntRngDest
For i = 1 To .Rows.Count
i2 = i2 + 1
.Cells(i, 1).Value = arrValori(i2)
Next i
End With
End If
End With
Next Ws
'<--- fine trasferimento in matrice / inizio conteggio macro in (I.A) CELLA AB49 --->
With .Sheets("(I.A)")
If .Range("AE49") = 7 Then
.Range("AE49") = 1
.Range("W48:AB53") = Empty
Else
.Range("AE49") = .Range("AE49") + 1
End If
IndiceRiferimento = .Range("AE49").Value '<--- 1,2,3,4,5,6,7
Valore1 = Wb.Sheets("GIOCO").Range("H21").Value
Valore2 = .Range("Q3").Value
Valore3 = Wb.Sheets("GIOCO").Range("H20").Value
Valore4 = .Range("Q2").Value
Valore5 = Wb.Sheets("GIOCO").Range("H19").Value
Valore6 = .Range("Q1").Value
Select Case IndiceRiferimento
Case 1
.Range("V48") = Valore1
.Range("V49") = Valore2
.Range("V50") = Valore3
.Range("V51") = Valore4
.Range("V52") = Valore5
.Range("V53") = Valore6
Case 2
.Range("W48") = Valore1
.Range("W49") = Valore2
.Range("W50") = Valore3
.Range("W51") = Valore4
.Range("W52") = Valore5
.Range("W53") = Valore6
Case 3
.Range("X48") = Valore1
.Range("X49") = Valore2
.Range("X50") = Valore3
.Range("X51") = Valore4
.Range("X52") = Valore5
.Range("X53") = Valore6
Case 4
.Range("Y48") = Valore1
.Range("Y49") = Valore2
.Range("Y50") = Valore3
.Range("Y51") = Valore4
.Range("Y52") = Valore5
.Range("Y53") = Valore6
Case 5
.Range("Z48") = Valore1
.Range("Z49") = Valore2
.Range("Z50") = Valore3
.Range("Z51") = Valore4
.Range("Z52") = Valore5
.Range("Z53") = Valore6
Case 6
.Range("AA48") = Valore1
.Range("AA49") = Valore2
.Range("AA50") = Valore3
.Range("AA51") = Valore4
.Range("AA52") = Valore5
.Range("AA53") = Valore6
Case 7
.Range("AB48") = Valore1
.Range("AB49") = Valore2
.Range("AB50") = Valore3
.Range("AB51") = Valore4
.Range("AB52") = Valore5
.Range("AB53") = Valore6
End Select
End With
MsgBox "Fatto!"
End With
'<--- riattivo lo schermo, gli eventi e imposto nuovamente il calcolo in automatico --->
With Application
.ScreenUpdating = True
.EnableEvents = True
.Calculation = xlCalculationAutomatic
End With
End If
End Sub
Sub PlayOn() ' start
song = "F:GIOCOLA BATTAGLIA DEI POTENTI1.mp3"
Call PlaySong(True)
End Sub
Sub PlayOff() ' stop
Call PlaySong(False)
End Sub
Private Sub PlaySong(Play As Boolean)
On Error Resume Next
Call mciSendString("Stop MPFE", 0&, 0, 0)
Call mciSendString("Close MPFE", 0&, 0, 0)
If Not Play Then Exit Sub
Call mciSendString("Open " & song & " Alias MPFE", 0&, 0, 0)
Call mciSendString("play MPFE from " & Reprise, 0&, 0, 0)
End Sub |
