View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
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