Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2014, 05:41 AM
MarkAn MarkAn is offline Userform VBA Textbox Calculation Windows 7 64bit Userform VBA Textbox Calculation Office 2010 64bit
Novice
Userform VBA Textbox Calculation
 
Join Date: Aug 2014
Posts: 2
MarkAn is on a distinguished road
Default Userform VBA Textbox Calculation

Hi



I have a userform, in the form I have x2 textboxes

Textbox1 and Textbox2. Each of these boxes will contain a value (which can change dependant on what has been entered by the user)

I.e. Textbox1 = 12, Textbox2 = £132.65

Can anyone please help with the VBA that when I click on CommandButton1, it will multiply Textbox1 and Textbox2 and bring back the answer into Textbox3.

Any help will be most appreciated.

MarkAn
Reply With Quote
  #2  
Old 08-15-2014, 06:47 AM
macropod's Avatar
macropod macropod is offline Userform VBA Textbox Calculation Windows 7 32bit Userform VBA Textbox Calculation Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That really is very basic:
Code:
Private Sub CommandButton1_Click()
On Error Resume Next
With Me
  .TextBox3.Value = .TextBox1.Value * .TextBox2.Value
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 08-15-2014, 06:50 AM
MarkAn MarkAn is offline Userform VBA Textbox Calculation Windows 7 64bit Userform VBA Textbox Calculation Office 2010 64bit
Novice
Userform VBA Textbox Calculation
 
Join Date: Aug 2014
Posts: 2
MarkAn is on a distinguished road
Default

Thanks

I've been looking at VBA all day and had a brain freeze, as soon as I posted I realised.....

time for a long break I think


Thanks again
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform VBA Textbox Calculation Is it possible to take an input from a UserForm in one document to a UserForm in a do BoringDavid Word VBA 5 05-09-2014 09:08 AM
Please help with age calculation!!! Microsoft Idiot Word 4 10-29-2012 05:54 AM
Userform VBA Textbox Calculation Display result in textbox based on the input of another textbox scarymovie Word VBA 5 05-16-2012 07:05 PM
Userform VBA Textbox Calculation Number format in Textbox on userform officeclerk Excel Programming 2 04-17-2012 01:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft