Private Sub CommandButton1_Click()
Set RangeA = Range(RefEdit1.Text)
Set RangeB = Range(RefEdit2.Text)
RangeC = RangeA.Formula
RangeA.Formula = RangeB.Formula
RangeB.Formula = RangeC
End Sub
dim d as boolean, r1 as range, r2 as range
d=application.displayalerts
application.displayalerts=false
set r1=selection.areas(1)
set r2=selection.areas(2)
with thisworkbook.worksheets.add
r1.copy .cells(r1.cells(1).row, r1.cells(1).column)
r2.copy r1
.cells(r1.cells(1).row, r1.cells(1).column).copy r2
.delete
end with
application.displayalerts=d
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 104