Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default calculate textboxvalues

Hi,

I'm trying to calculate 3 textboxevalues into one, but they don't add up as
the should.

UserForm1.TextBox5.Value = UserForm1.TextBox2.Value +
UserForm1.TextBox3.Value + UserForm1.TextBox4.Value

Why doesn't this work? Or does anyone knows a better way?

greetings


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default calculate textboxvalues

UserForm1.TextBox5.Value = Val(UserForm1.TextBox2.Value) + _
val(UserForm1.TextBox3.Value) + Val(UserForm1.TextBox4.Value)

the plus sign can be used for concatenation when used with strings and
values stored in textboxes are strings.

--
Regards,
Tom Ogilvy



"Peterke" wrote in message
...
Hi,

I'm trying to calculate 3 textboxevalues into one, but they don't add up

as
the should.

UserForm1.TextBox5.Value = UserForm1.TextBox2.Value +
UserForm1.TextBox3.Value + UserForm1.TextBox4.Value

Why doesn't this work? Or does anyone knows a better way?

greetings




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate time does not calculate Wanna Learn Excel Discussion (Misc queries) 4 August 19th 08 12:51 AM
self calculate ecurb849 Excel Discussion (Misc queries) 8 March 29th 08 08:11 AM
only calculate if 100 KJensen Excel Worksheet Functions 5 May 22nd 06 10:45 PM
how do I calculate a mean higgypop Excel Programming 3 January 26th 05 12:22 PM
Macro that hide or unhide and not calculate or calculate Jonsson Excel Programming 1 August 19th 03 04:22 PM


All times are GMT +1. The time now is 05:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Đ2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"