Como faria para que meu código abaixo Salvasse valore na Plan1 e não Texto ?
Código
do Módulo
Sub cadComp()
linha = 10
Do Until Sheets("CUSTOS DE COMPRAS").Cells(linha, 1) = "" linha = linha + 1 Loop
Sheets("CUSTOS DE COMPRAS").Cells(linha, 2) = telaComp.TextBox1.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 6) = telaComp.TextBox2.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 1) = telaComp.TextBox3.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 7) = telaComp.TextBox4.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 8) = telaComp.TextBox5.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 9) = telaComp.TextBox6.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 10) = telaComp.TextBox7.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 11) = telaComp.TextBox8.Text Sheets("CUSTOS DE COMPRAS").Cells(linha, 12) = telaComp.TextBox9.Text
MsgBox " Nota Cadastrada com SUCESSO!!", vbInformation, " NOTA CADASTRADA"
limpar
End Sub
Código
do Botão cadastrar
Private Sub btnCadastrar_Click()
If TextBox4 = "" Then
MsgBox " Falta Calcular o Valor Total da Nota!!", vbInformation, " TOTAL
DA NOTA"
Else TextBox1.SetFocus
If MsgBox(" AS INFORMAÇÕES ESTÃO CORRETAS?" & Chr(13) & Chr(13) &
" Se estiver, confirme em SIM e Cadastre a Nota.", vbYesNo + vbQuestion, " CADASTRAR A NOTA") = vbYes Then cadComp Else TextBox1.SetFocus End If End If
End Sub
Se alguém puder me orientar agradeceria de coração, pois sou iniciante em VBA.