Ciao,
come posso risolvere questo problema:
se il mio intervallo di selezione è compreso nell'intervallo A1:Z100 allora posso eliminare queste righe.
if ...
Selection.EntireRow.Delete
end if
Grazie.
Moderatori: Anthony47, Flash30005
If Application.Intersect(Range("A1:Z1000"), Selection).Count = Selection.Count Then
Selection.EntireRow.Select
End If
If Application.Intersect(Range("A14:V1000"), Selection).Count = Selection.Count Then
Response = MsgBox("Sei sicuro di voler eliminare queste righe?", vbYesNo)
If Response = vbYes Then
Selection.EntireRow.Delete
ActiveCell.Select
End If
End If
Set iset = Application.Intersect(Range("A1:Z1000"), Selection)
If Not iset Is Nothing Then
'
'Il codice precedente
'
End If
Public Sub prova()
Dim rngInt As Range
Set rngInt = Application.Intersect(Range("A14:V1000"), Selection)
If Not rngInt Is Nothing Then
If rngInt.Address = Selection.Address Then
With Selection
If MsgBox("Sei sicuro di voler eliminare le righe " & .EntireRow.Address(0, 0) & "?", vbYesNo) = vbYes Then
'Application.EnableEvents = False 'attivare se necessario
.EntireRow.Delete
ActiveCell.Select
'Application.EnableEvents = True 'attivare se necessario
End If
End With
End If
End If
Set rngInt = Nothing
Torna a Applicazioni Office Windows
Archiviare selezione in formato .pdf Autore: Carletto Ribolla |
Forum: Applicazioni Office Windows Risposte: 9 |
Aggiornamento automatico intervallo grafici Autore: wallace&gromit |
Forum: Applicazioni Office Windows Risposte: 3 |
Aumenta/dim la parte numerale di un intervallo di formule Autore: papiriof |
Forum: Applicazioni Office Windows Risposte: 21 |