
Sub Svuota()
Application.EnableEvents = 0
With Me
.ComboBox1 = ""
.ComboBox2 = ""
.ComboBox3 = ""
End With
Application.EnableEvents = 1
End Sub |
Private Sub ComboBox3_Change()
If ComboBox3.Value = "" Then
Sheets("Foglio1").Cells(1, 9) = ""
Else
Sheets("Foglio1").Cells(1, 9) = CDbl(ComboBox3.Value)
End If
End Sub
Sub Svuota()
Application.EnableEvents = 0
With Me
.ComboBox1 = ""
.ComboBox2 = ""
.ComboBox3 = ""
End With
Application.EnableEvents = 1
End Sub
|
Private Sub ComboBox3_Change()
If ComboBox3.Value = "" Then
Sheets("Foglio1").Cells(1, 9) = Sheets("Foglio1").Cells(1, 9)
Else
Sheets("Foglio1").Cells(1, 9) = CDbl(ComboBox3.Value)
End If
End Sub
Sub Svuota()
Application.EnableEvents = 0
With Me
.ComboBox1 = ""
.ComboBox2 = ""
.ComboBox3 = ""
End With
Application.EnableEvents = 1
End Sub
|
Sub completa() registra Foglio1.Svuota End Sub |
Dim i As Integer For i = Combo1.ListCount - 1 To 0 Step -1 Combo1.RemoveItem i Next i |
Sheets("Foglio1").Cells(1, 7) = ComboBox1
Sheets("Foglio1").Cells(1, 8) = ComboBox2 |
Combobox1.Clear
Sub registra()
With [X1048576]
[F1:H1].Copy [X1048576].End(xlUp).Offset(1)
ActiveSheet.PivotTables("Tabella_pivot3").PivotCache.Refresh
End With
End Sub
|
Sub registra()
Dim ur As Integer
ur = [X1048576].End(xlUp).Offset(1).Row
With ActiveSheet
If .ComboBox1 = "" Or .ComboBox2.Value = "" Or .ComboBox3.Value = "" Then
MsgBox "Attenzione, campo vuoto. Impossibile registrare"
Exit Sub
End If
Cells(ur, "x") = .ComboBox1
Cells(ur, "y") = .ComboBox2
Cells(ur, "z") = .ComboBox3
.ComboBox1 = ""
.ComboBox2 = ""
.ComboBox3 = ""
End With
End Sub |
Cells(ur, "z") = Format(.ComboBox3, "0,00") |
if ur < 3 then ur = 2 |
if .cells(2,"Z") = "" then ur = 2 ma meglio vedere il codice completo |
Sub registra()
Dim ur As Integer
ur = [X1048576].End(xlUp).Offset(1).Row
With ActiveSheet
If .ComboBox1 = "" Or .ComboBox2.Value = "" Or .ComboBox3.Value = "" Then
MsgBox "Attenzione, campo vuoto. Impossibile registrare"
Exit Sub
End If
Cells(ur, "x") = .ComboBox1
Cells(ur, "y") = .ComboBox2
Cells(ur, "z") = Format(.ComboBox3, "0,00")
.ComboBox1 = ""
.ComboBox2 = ""
.ComboBox3 = ""
End With
ActiveSheet.PivotTables("pivot").PivotCache.Refresh
End Sub
|
ur = Sheets("foglio1").ListObjects("Tabella1").ListRows.Count + 2 |
ur = Sheets("foglio1").ListObjects("Tabella1").ListRows.Count + 2 |
CDbl(ComboBox3.Value) |
Guida di riferimento per sviluppatori di Excel Oggetto ListRows Insieme di tutti gli oggetti ListRow nell'oggetto ListObject specificato. Note Ogni oggetto ListRow rappresenta una riga della tabella. Esempio Utilizzare la proprietà ListRows dell'oggetto ListObject per restituire l'insieme ListRows. Nell'esempio seguente viene aggiunta una nuova riga all'oggetto ListObject predefinito nel primo foglio di lavoro della cartella di lavoro. Poiché non viene specificata una posizione, la nuova riga verrà aggiunta alla fine della tabella. Visual Basic, Application Edition Set myNewRow = Worksheets(1).ListObject(0).ListRows.Add |
