
With Range("a8, b8")
With Worksheets("Aree Verdi").Activate fino a Worksheets("Aree Verdi").Cells(riga, 2) = CSng(TextBox1) perchè può essere migliorato e sintetizzato.
Option Explicit
Private Sub CommandButton1_Click()
Dim ultima_riga As Long
With Worksheets("Aree Verdi").Activate
.Range("a7").End(xlDown).Offset(1) = ComboBox1.Value
.Cells(ActiveCell.Row, 2) = CSng(TextBox1)
ultima_riga = Cells(Columns(1).Cells.Count, 1).End(xlUp).Row
With Range("a8:c" & ultima_riga)
With .Borders
.LineStyle = xlContinuous
.Weight = xlThin
End With
End With
End With
Worksheets("Sfondo").Select
MsgBox "Inserimento effettuato"
ComboBox1.Value = ""
TextBox1.Value = ""
End Sub |
With Worksheets("Aree Verdi").Activate
Range("a7").End(xlDown).Offset(1) = ComboBox1.Value
Cells(ActiveCell.Row, 2) = CSng(TextBox1) |
