Moderatori: Anthony47, Flash30005
Private Sub Workbook_Open()
If Worksheets("Foglio1").Range("A3").Text = "" Then
MsgBox "Compilare la cella A3"
Cancel = True
End If
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ColI = 1
ColF = 4
RigaI = 2
RigaF = 5
For CC = ColI To ColF
For RR = RigaI To RigaF
If Worksheets("Foglio1").Cells(RR, CC).Text = "" Then
Set mc = Worksheets("Foglio1").Cells(RR, CC)
Worksheets("Foglio1").Cells(RR, CC).Select
MsgBox "Compilare la cella " & mc.Address(RowAbsolute:=False, ColumnAbsolute:=False)
Cancel = True
End If
Next RR
Next CC
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
LastRow = Cells(Rows.Count, 8).End(xlUp).Row
For Each Cella In Range("A1").Offset(LastRow - 1, 0).Range("A1:G1")
If IsEmpty(Cella) Then Cancel = True
Next Cella
If Cancel Then
MsgBox ("Le colonne A:G della riga " & LastRow & " non sono state ancora compilate " _
& vbCrLf & "Il File NON E' STATO salvato")
End If
End Sub
ColI = 1
ColF = 7
RigaI = 2
RigaF = Range("H" & Rows.Count).End(xlUp).Row
'... il resto della macro rimane invariato
'...
Torna a Applicazioni Office Windows
Mettere tutto MAIUSCOLO un range di celle Autore: raimea |
Forum: Applicazioni Office Windows Risposte: 7 |
Trasformare celle con formattazioni in html Autore: servicedynergy |
Forum: Applicazioni Office Windows Risposte: 5 |
inserisci valore in celle a seguito di condizione Autore: ucame |
Forum: Applicazioni Office Windows Risposte: 10 |
Codice per popolare celle con condizione Autore: ucame |
Forum: Applicazioni Office Windows Risposte: 3 |
Visitano il forum: Nessuno e 45 ospiti