PC Review


Reply
Thread Tools Rate Thread

Can I put a Formula into an Excel User Form?

 
 
jamie@e-comp.co.uk
Guest
Posts: n/a
 
      9th Sep 2008
I have a userform with three text boxes...

TxtBox1
TxtBox2
TxtBox3

Each text box fills a cell (on clicking CmdOK) A1, A2, A3

I want TxtBox1 to muliplty by TxtBox2 and the value to enter
TxtBox3...

Can this be done. I know that I can put this simple formula into the
worksheet but I want the use to work in the userform...So the formula/
calculation has to be done in VB?

Regards and thanks in advance!

Jamie
 
Reply With Quote
 
 
 
 
Shasur
Guest
Posts: n/a
 
      9th Sep 2008
Hi

Can you try the following in the change events of

TxtBox1 and TxtBox2

Private Sub TxtBox1_Change()
On Error Resume neXt
TxtBox3.Text = TxtBox1.Text * TxtBox2.Text
End Sub

Private Sub TxtBox2_Change()
On Error Resume neXt
TxtBox3.Text = TxtBox1.Text * TxtBox2.Text
End Sub

Cheers
Shasur

--
http://vbadud.blogspot.com


"(E-Mail Removed)" wrote:

> I have a userform with three text boxes...
>
> TxtBox1
> TxtBox2
> TxtBox3
>
> Each text box fills a cell (on clicking CmdOK) A1, A2, A3
>
> I want TxtBox1 to muliplty by TxtBox2 and the value to enter
> TxtBox3...
>
> Can this be done. I know that I can put this simple formula into the
> worksheet but I want the use to work in the userform...So the formula/
> calculation has to be done in VB?
>
> Regards and thanks in advance!
>
> Jamie
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
formula behind field on user form Lisa Microsoft Excel Programming 3 5th Mar 2008 06:06 PM
User Form Formula =?Utf-8?B?c2JydW5lcg==?= Microsoft Excel Programming 3 19th Jul 2005 10:56 PM
User Form Formula ? =?Utf-8?B?bXVsbHk=?= Microsoft Excel New Users 2 1st Jul 2005 04:16 PM
Formula for Excel User Name =?Utf-8?B?U2hlbGxs?= Microsoft Excel Worksheet Functions 9 27th May 2005 11:01 AM
EXCEL 2002: How do I user/simulate a Timer event in Excel form JohnF Microsoft Excel Programming 12 23rd Sep 2004 04:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:08 PM.