
Sub Copia_in_Basso()
Activesheeet.Range("A2:A3").Select ' fai attenzione che si posizioni sul foglio esatto dove far partire la macro
Selection.AutoFill Destination:=Range("A2:A100"), _
Type:=xlFillDefault
Range("A2:100").Select
End Sub
|
lCont = 0
Righe = Range("B" & Rows.Count).End(xlUp).Row
Set rng = Range("B2:B" & Righe)
ListBox1.Clear
For Each c In rng
If ComboBox1.Value = aaax And ComboBox2.Value = mmx Then
ListBox1.AddItem
ListBox1.List(lCont, 0) = lCont + 1
ListBox1.List(lCont, 1) = c.Offset(0, -1).Value
ListBox1.List(lCont, 2) = c.Offset(0, 0).Value
ComboBox3.AddItem ListBox1.List(lCont, 2)
lCont = lCont + 1
End If
Next
Set rng = Nothing |
Dim n As Integer
Dim r As Integer
r = 2
Inizio:
If sh.Range("B" & CStr(r)).Value = 0 Or sh.Range("B" + CStr(r)).Value = ""
Then
GoTo Fine
End If
sh.Range("A" + CStr(r)).Value = CStr(r - 1)
r = r + 1
GoTo Inizio
Fine:
End Sub
|
