Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Very Simple Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cjwenngatz@gmail.com - 19 May 2006 00:43 GMT
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 - 19 May 2006 02:51 GMT
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

Signature

Regards,
Tom Ogilvy

> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.