Pagina precedente | 1 2 3 4 | Pagina successiva
Vota | Stampa | Notifica email    
Autore

messaggio di errore con due celle piene

Ultimo Aggiornamento: 21/06/2020 09:46
Post: 193
Registrato il: 02/04/2010
Città: MILANO
Età: 54
Utente Junior
2002
OFFLINE
23/12/2017 13:02

dodo mi dovresti dire dove devo mettere il tuo codice perchè non so come va inserito.
perchè ho provato ad inserire un nuovo modulo e in this workbook mettendo il codice cosi modificato

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If ActiveSheet.Name <> "RIEP" And ActiveSheet.Name <> "codici servizi" Then


Dim R As Long
R = Target.Row

If Not Intersect(Target, [I14:I60]) Is Nothing Then
If Range("I" & R) = 2 Or Range("I" & R) = 3 Or Range("I" & R) = 4 Then
MsgBox "qui va messo solo codice presenza"
Application.EnableEvents = False
Target.ClearContents
Application.EnableEvents = True
End If
End If



' questo codice ti da un messaggio di errore se per sbaglio metti riposo lo stesso giorno che hai lavorato
If Intersect(Target, Uni0n(Range("C14:C60"), Range("J14:J60"))) Is Nothing Then Exit Sub
Select Case Target.Column
Case 3
If Range("J" & R) <> "" Then

MsgBox "Non puoi scrivere in questa cella se colonna J non è vuota"
Application.EnableEvents = False
Target.ClearContents
Application.EnableEvents = True
Exit Sub
End If
Case 10
If Range("C" & R) <> "" Then

MsgBox "Non puoi scrivere in questa cella se colonna C non è vuota"
Application.EnableEvents = False
Target.ClearContents
Application.EnableEvents = True
Exit Sub
End If
End Select

End Sub



ma non funziona
grazie
[Modificato da trittico69 23/12/2017 14:48]
excel 2003
Vota:
Amministra Discussione: | Chiudi | Sposta | Cancella | Modifica | Notifica email Pagina precedente | 1 2 3 4 | Pagina successiva
Nuova Discussione
 | 
Rispondi
Cerca nel forum
Tag discussione
Discussioni Simili   [vedi tutte]
Feed | Forum | Bacheca | Album | Utenti | Cerca | Login | Registrati | Amministra
Tutti gli orari sono GMT+01:00. Adesso sono le 22:52. Versione: Stampabile | Mobile | Regolamento | Privacy
FreeForumZone [v.6.1] - Copyright © 2000-2024 FFZ srl - www.freeforumzone.com