Vc deve ajustar a linha lastcolum, para a linha que deseja realmente
lastColum = Cells(1, Cells.Columns.Count).End(xlToLeft).Column "(aqui o 1 representa a linha 1, e a ultima coluna com dados e 14 (N1)
Experimente:
Private Sub userform_activate()
Dim lastColum As Integer
lastColum = Cells(2, Cells.Columns.Count).End(xlToLeft).Column
TextBox4.Value = Sheets("Copel").Cells(2, lastColum) 'Vencimento
TextBox5.Value = Sheets("Copel").Cells(3, lastColum)
TextBox6.Value = Sheets("Copel").Cells(4, lastColum)
TextBox7.Value = Sheets("Copel").Cells(5, lastColum)
TextBox8.Value = Sheets("Copel").Cells(2, lastColum - 1) 'Vencimento
TextBox9.Value = Sheets("Copel").Cells(3, lastColum - 1)
TextBox10.Value = Sheets("Copel").Cells(4, lastColum - 1)
TextBox11.Value = Sheets("Copel").Cells(5, lastColum - 1)
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 19/09/2012 8:41 am