View Full Version : [SOLVED:] Textbox Data
mini12
08-14-2005, 12:17 PM
Is there a way i could add two textbox data into one cell using vba
Bob Phillips
08-14-2005, 01:46 PM
Is there a way i could add two textbox data into one cell using vba
Range("A1").Value = CDbl(Textbox1.Text) + CDbl(Textbox2.Text)
Is there a way i could add two textbox data into one cell using vba
if "add" means numerical addition, then xld's reply is corrent. It converts whatever is in each text box to Dble, adds them together and stuffs the result into, in this case, Cell A1.
if "add" means "concatenate" or "string add", then the code would be:
Range("A1").Text = Textbox1.Text & Textbox2.Text
Bob Phillips
08-15-2005, 03:38 AM
if "add" means numerical addition, then xld's reply is corrent. It converts whatever is in each text box to Dble, adds them together and stuffs the result into, in this case, Cell A1.
if "add" means "concatenate" or "string add", then the code would be:
Range("A1").Text = Textbox1.Text & Textbox2.Text
Just FYI, you can also use
Range("A1").Value = Textbox1.Text + Textbox2.Text
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.