![]() |
How to calculate data that is entered into a text box
Hi all,
I have designed a user form for one of my workbooks that collects data from the user. I have three textboxes that collect numeric values. When a user enters data into TextBox1 only or in both TextBox1 and TextBox2, and a value is entered into TextBox3, I would like for TextBox4 (or Label1) to calculate by the figure entered into TextBox3 by the number of textboxes (either only TextBox1 or both TextBox1 and TextBox2) that have data entered. For example: TextBox1 = 100000 TextBox2 = left blank TextBox3 = 50 therefore TextBox4 (or Label1)= 50 If TextBox2 =200000, then TextBox4 (or Label1) will then equal 100. I would like for TextBox4 (Label1) to be updated automatically once the user has moved the focus from TextBox3. Is this possible? Thanx in advance. |
How to calculate data that is entered into a text box
Hi,
You can use the "AfterUpdate" or "Exit" event of the textbox to do the processing HTH Kalpesh |
All times are GMT +1. The time now is 01:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com