Estou meio perdido, como eu aplicaria isso aqui?
Private Sub UserForm_Initialize()
Dim ws As Worksheet
Set ws = Worksheets("SET")
If ws.Range("X213").Value = 2 Then
'copia os dados para as celulas
ws.Cells(213, 32).Value = Format(Me.TextBox1.Value, "0.00")
'ws.Cells(215, 32).Value = Me.TextBox3.Value
'ws.Cells(217, 32).Value = Me.TextBox3.Value
'ws.Cells(219, 32).Value = Me.TextBox4.Value
'ws.Cells(221, 32).Value = Me.TextBox5.Value
'ws.Cells(223, 32).Value = Me.TextBox6.Value
'ws.Cells(225, 32).Value = Me.TextBox7.Value
'ws.Cells(227, 32).Value = Me.TextBox8.Value
'Limpa os campos TextBox para inserir novos dados
'Me.TextBox1.Value = ""
Me.TextBox2.Visible = False
Me.TextBox3.Visible = False
Me.TextBox4.Visible = False
Me.TextBox5.Visible = False
Me.TextBox6.Visible = False
Me.TextBox7.Visible = False
Me.TextBox8.Visible = False
Me.TextBox1.SetFocus
Label3.Visible = False
Label4.Visible = False
Label5.Visible = False
Label6.Visible = False
Label7.Visible = False
Label8.Visible = False
Label10.Visible = False
Label11.Visible = False
Label12.Visible = False
Label13.Visible = False
Label14.Visible = False
Label15.Visible = False
Label9.Caption = Format(ws.Range("AH230"), "#,###0.00")
Postado : 11/05/2016 8:16 am