Option Explicit
Private Sub Form_Load()
Dim s As Variant
Me.ScaleMode = vbPixels
With Me.Controls.Add("vb.textbox", "textbox1")
.Move 10, 10, 150, 10
.Visible = True
End With
With Me.Controls.Add("vb.textbox", "textbox2")
.Move 10, 30, 150, 10
.Visible = True
End With
With Me.Controls.Add("vb.textbox", "textbox3")
.Move 10, 50, 150, 10
.Visible = True
End With
With CreateObject("excel.application")
With .workbooks.Add.worksheets(1)
.cells(1, 1).Value = "Всё-таки интересно."
.cells(1, 2).Value = "Неужели самому"
.cells(1, 3).Value = "было лень попробовать?"
.range(.cells(1, 1), .cells(1, 3)).Copy
s = Split(Clipboard.GetText(vbCFText), vbTab)
Me.Controls("textbox1").Text = s(0)
Me.Controls("textbox2").Text = s(1)
Me.Controls("textbox3").Text = s(2)
End With
.cutcopymode = False
.Visible = True
End With
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 39