
Private Sub CREA_CASELLA()
Dim ultima As Long, i As Long, j As Long
ultima = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row 'trovo l'ultima riga del foglio 1
For i = 1 To ultima
Sheets(1).Cells(i, 2) = "casella a discesa con elenco di dati"
Next
End Sub
|
Sub CREACASELLA()
Dim ultima As Long, i As Long, j As Long
ultima = Sheets(1).Range("A" & Rows.Count).End(xlUp).Row 'trovo l'ultima riga del foglio 1
For i = 1 To ultima
Range("b" & i).Select
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=voci"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Next i
End Sub
|
