ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Very Simple Question (https://www.excelbanter.com/excel-programming/361880-very-simple-question.html)

[email protected]

Very Simple Question
 
I'm creating my very first VBA form (Im a Newb), but I'm wondering how
to get the number that is typed in a a "textbox" to immediatly alter to
a negative amount when it is submitted and populates into the sheet?

Thank you,
C.


Tom Ogilvy

Very Simple Question
 
Use the event to write it to the cell

Private Sub TextBox1_Change()
if isnumeric(Textbox1.Text) then
Worksheets("Sheet1").Range("A1").Value = _
-1 * Abs(TextBox1.Text)
end if
End Sub



--
Regards,
Tom Ogilvy

wrote in message
ups.com...
I'm creating my very first VBA form (Im a Newb), but I'm wondering how
to get the number that is typed in a a "textbox" to immediatly alter to
a negative amount when it is submitted and populates into the sheet?

Thank you,
C.





All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com