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

Hi all

I am making a userform and I cant think how to get this to work. I am
trying to add textbox2 value to textbox3's ie 2 + 6 = 8

Here is the code I am using. Sorry I have a bit of brain fade.

TOTPEGS.Caption = TextBox2.Value + TextBox3.Value


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Textbox query

Sorry it is wrong I mean
textbox8.value = TextBox2.Value + TextBox3.Value


"Greg B" wrote in message
...
Hi all

I am making a userform and I cant think how to get this to work. I am
trying to add textbox2 value to textbox3's ie 2 + 6 = 8

Here is the code I am using. Sorry I have a bit of brain fade.

TOTPEGS.Caption = TextBox2.Value + TextBox3.Value


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default Textbox query

Hi,

caption expects a string.

object.Caption [= String]

A textbox contains a string, not a number.

Private Sub CommandButton1_Click()
UserForm1.Caption = _
CStr(CLng(TextBox1.Value) + CLng(TextBox2.Value))
End Sub

HTH

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

on strange territory

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"




Hi all

I am making a userform and I cant think how to get this to work. I am
trying to add textbox2 value to textbox3's ie 2 + 6 = 8

Here is the code I am using. Sorry I have a bit of brain fade.

TOTPEGS.Caption = TextBox2.Value + TextBox3.Value


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
textbox query Greg B Excel Discussion (Misc queries) 2 June 3rd 05 02:25 PM
Textbox Query Greg B[_5_] Excel Programming 2 May 7th 05 09:19 AM
Textbox Query Greg[_20_] Excel Programming 5 March 31st 05 06:59 PM
textbox query libby Excel Programming 0 January 13th 04 06:03 PM
textbox query libby Excel Programming 2 August 2nd 03 04:10 PM


All times are GMT +1. The time now is 07:29 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"