

...
Dim rng1 As Variant
Dim rng2 As Variant
...
rng1 = TextBox1.Text
rng2 = TextBox2.Text
....
Range("rng1:rng2").Select
With Selection.Interior
....
End With
...
как передать в Range диапазон из переменной? ругается...
with range(text1.text+":"+text2.text).interior
...
end with
dim c as excel.range
for each c in range(text1+":"+text2)
msgbox c.value
next
Сейчас этот форум просматривают: Google-бот и гости: 50