Avevo due macro per il Worksheet_BeforeDoubleClick, che separatamente funzionano.
Ho provato a metterle insieme ma ne funziona solo una. (la prima parte che con range "c:h" )
eccola qua:
- Codice: Seleziona tutto
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim myArea As String, Rispo, myMatch
'
miofoglio = "Foglio 2" '<<<Il PRIMO foglio di lavoro dei doppioclick
If ThisWorkbook.Sheets(miofoglio).Range("Z1").Value = 0 Then ThisWorkbook.Sheets(miofoglio).Range("Z1").Value = 10: Call oneSec
myArea = "B:H" '<<< Le colonne dedicate agli stati
'
If Not Application.Intersect(Target, Application.Intersect(Range("C:H"), Range("2:500"))) Is Nothing Then
Cancel = True
Target.Value = Now - Int(Now)[/b][/u]
If Not Application.Intersect(Target, Application.Intersect(Range("B:B"), Range("1:1"))) Is Nothing Then
Cancel = True
Rispo = Application.InputBox("Numero del tavolo:", "Tavolo?", , , , , , 1)
If Rispo = False Then Exit Sub
myMatch = Application.Match(Rispo, Range("A:A"), 0)
If Not IsError(myMatch) Then
Cells(myMatch, Target.Column) = Now - Int(Now)
End If
End If
End If
Call disposizionevalori
End Sub
Grazie in anticipo