eseguire mp3 e wav in excel

Anonimo
2016-09-03T12:55:40+00:00

Salve vorrei aggiungere al mio file Excel nominato "ULTIMO.LA BATTAGLIA DEI POTENTI V 33,

i seguenti file audio:    Grazie in anticipo!

1)1.mp3 all'avvio ... per sempre in ripetizione (Loop).

2)1.wav quando cella F24=Eliminerà DELLA SCHEDA ->GIOCO.

PER IL MOMENTO TUTTO QUI.

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)--->

         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

Microsoft 365 e Office | Excel | Per la casa | Windows

Domanda bloccata. Questa domanda è stata eseguita dalla community del supporto tecnico Microsoft. È possibile votare se è utile, ma non è possibile aggiungere commenti o risposte o seguire la domanda.

0 commenti Nessun commento
Risposta accettata dall'autore della domanda
Anonimo
2016-09-06T07:16:32+00:00

Qui si risponde, capita la domanda, come e quando si può e se si ha una risposta.

Per il tuo problema vedi qui:

La risposta è stata utile?

0 commenti Nessun commento

6 risposte aggiuntive

Ordina per: Più utili
  1. Anonimo
    2016-09-06T15:13:31+00:00

    link ottimi ora li studio     grazie ---->Mauro Gamberini !

    La risposta è stata utile?

    0 commenti Nessun commento
  2. Eliminata

    Questa risposta è stata eliminata a causa di una violazione del codice di comportamento. La risposta è stata segnalata manualmente o identificata tramite il rilevamento automatizzato prima dell'esecuzione dell'azione. Per ulteriori informazioni, fai riferimento al codice di comportamento.


    I commenti sono stati disattivati. Ulteriori informazioni