Galera,
To precisando de uma força..
tem como diminuir o numero dessa formula abaixo.. pois chega a um ponto que a macro não aceita mais.
Sub Copiar()
Dim MyDataObj As DataObject
Set MyDataObj = New DataObject
TextBox1.Value = Range("AE6")
TextBox1.Text = Range("AE6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 14) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AG6")
TextBox1.Text = Range("AG6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 16) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AH6")
TextBox1.Text = Range("AH6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 17) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AI6")
TextBox1.Text = Range("AI6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 18) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AJ6")
TextBox1.Text = Range("AJ6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 19) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AK6")
TextBox1.Text = Range("AK6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 20) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AL6")
TextBox1.Text = Range("AL6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 21) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AM6")
TextBox1.Text = Range("AM6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 22) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AN6")
TextBox1.Text = Range("AN6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 23) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AO6")
TextBox1.Text = Range("AO6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 24) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AQ6")
TextBox1.Text = Range("AQ6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 26) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AR6")
TextBox1.Text = Range("AR6").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(6, 27) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AE7")
TextBox1.Text = Range("AE7").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(7, 14) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
'fim
TextBox1.Value = Range("AG7")
TextBox1.Text = Range("AG7").Value
MyDataObj.SetText TextBox1
MyDataObj.PutInClipboard
MyDataObj.GetFromClipboard
Cells(7, 16) = MyDataObj.GetText()
MyDataObj.SetText ""
MyDataObj.PutInClipboard
e por ai vai... tem como "compactar" esse comando?
Postado : 12/06/2012 1:02 pm