0
I have a vba in Excel, however the command saves the entries as text, so it is not possible to apply any formula. I’ve done some trials and research but all of them were failed, follow the codes:
Private Sub CommandButton_gravar_Click()
Dim valor As Currency
Dim data As Date
valor = TextBox_valor
data = TextBox_data
Range("b11").Select
If Range("b12").Value <> "" Then
Selection.End(xlDown).Select
End If
ActiveCell.Offset(1, 0).Select
Selection.Value = TextBox_data
ActiveCell.Offset(0, 1).Select
Selection.Value = ComboBox_categoria
ActiveCell.Offset(0, 1).Select
Selection.Value = TextBox_historico
ActiveCell.Offset(0, 1).Select
Selection.Value = ComboBox_movimento
ActiveCell.Offset(0, 1).Select
Selection.Value = TextBox_valor
Unload UserForm_lançamento
Thank you very much but the proposal did not work, which I managed to solve the problem by adding a conversion: Selection.Value = Ccur(Textbox_value)
– Mateus Pereira
Glad you found a solution! Thanks for sharing.
– Bruno Monteiro