Hi to all
This macro
Option Explicit
'=SE.ERRORE(CONFRONTA(D4;articoli!B6:B8000;0)+5;0)
Sub Canc_A_O_1_riga_new() 'mine
Dim Nriga As Long
Dim n As Long
'Dim x As Long
Dim avviso As String
Dim SComm1, SComm2 As String
SComm1 = Sheets("nuovo_articolo").Range("D4").Value
SComm2 = Sheets("nuovo_articolo").Range("F4").Value
If ActiveSheet.Range("F4").Value = 0 Then
avviso = MsgBox("Sign. " & Environ("UserName") & Chr(13) & "inserisci un'articolo da eliminare," & Chr(13) & _
"l'articolo inserito < " & SComm2 & " > " & Chr(13) & _
"non è presente in foglio < articoli >!", _
vbInformation + vbOKOnly + vbDefaultButton2, "AVVISO")
Exit Sub
End If
avviso = MsgBox("elimino l'articolo < " & SComm1 & " > in riga < " & SComm2 & _
" > ? ", vbYesNo + vbExclamation, "ATTENZIONE!")
If avviso = vbNo Then
Exit Sub
End If
Sheets("articoli").Select
ActiveSheet.Unprotect "123456"
Application.ScreenUpdating = False
Nriga = SComm2
Application.EnableEvents = False
Range(Cells(Nriga, "B"), Cells(Nriga, "Q")).ClearContents
Application.EnableEvents = True
Call rimetti_formula
'Call formula_2
ActiveSheet.Protect "123456"
Sheets("nuovo_articolo").Select
Sheets("nuovo_articolo").Range("D4").Select
Selection.ClearContents
Application.ScreenUpdating = True
End Sub
deletes the row sheet "articoli" inserted in the sheet "nuovo articolo" cell D4.
after deleting the row the formulas of the deleted row are inserted with this macro
Call rimetti_formula
this macro puts the formulas back across the range and is very slow.
this macro is possible only for the deleted row?
I hope I have explained
thank you
john
Bookmarks