• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Number format problem

Villalobos

Active Member
Hello,

I record the data through Textbox1 and unfortunately the format of output cell is text (green triangle at the left top corner) instead of number.
How is it possible convert to number?

Code:
 Private Sub CommandButton1_Click()

Dim LastRow As Object

            Set LastRow = Munka2.Range("B65536").End(xlUp)
                LastRow.Offset(1, 0).Value = TextBox1

                MsgBox "Data has been recorded."
                response = MsgBox("Would you like to continue?", _
                    vbYesNo)
            
            If response = vbYes Then
                Unload Me
                UserForm1.Show
            End If
            
            ThisWorkbook.Save
            
            If response = vbNo Then
                End
            End If
                  
            ThisWorkbook.Save
End Sub
 

Attachments

  • Number format problem.xlsm
    19.9 KB · Views: 3
Hi, Villalobos!
Despite you solved your original question, there's still an issue: you're saving the workbook twice. And just in case, loaded userforms status aren't kept at save time, so next time you'll open the file, they will be unloaded.
Regards!
 
Hi, Villalobos!
Glad you solved it. Thanks for your feedback and for your kind words too. And welcome back whenever needed or wanted.
Regards!
 
Back
Top