Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value)


i tried it but it did not work
i made a userform and placed textboxes on it and commandba
butten....but.....

could u hel

--
helmekk

-----------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...nfo&userid=693
View this thread: http://www.excelforum.com/showthread.php?threadid=26909

  #2   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value)

Hi helmekki

You need to set texrbox1 to an integer.
You can either do this in code with the
line I added or right click the textbox and
set the value in the properties box.

Also; add another command button and
paste Dave's suggested code, it will work
with the same textboxes on the form.
You might want to change the format
to ###.00

Private Sub CommandButton1_Click()

Dim box1 As Integer
Dim box2 As Integer
Dim box3 As Integer
Dim box4 As Integer
box1 = TextBox1.Value
box2 = TextBox2.Value
box3 = TextBox3.Value
box4 = TextBox4.Value

'add this line or cut and paste
TextBox1.Value = 0

box1 = (box2 - (box3 + box4))

MsgBox box1, , "Good Luck TK"
TextBox1.Value = box1

End Sub

Good Luck
TK


"helmekki" wrote:


i tried it but it did not work
i made a userform and placed textboxes on it and commandbar
butten....but.....

could u help


--
helmekki


------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=269094


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value)

I'm confused about what you tried and what you put in the textboxes when you
tried it.

You may want to post your code (and your data)--not the workbook.

helmekki wrote:

i tried it but it did not work
i made a userform and placed textboxes on it and commandbar
butten....but.....

could u help

--
helmekki

------------------------------------------------------------------------
helmekki's Profile: http://www.excelforum.com/member.php...fo&userid=6939
View this thread: http://www.excelforum.com/showthread...hreadid=269094


--

Dave Peterson

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
TextBox1 to Label4 damorrison Excel Discussion (Misc queries) 5 March 12th 06 04:05 PM
TextBox1.value=TextBox2.value-(TextBox3.value+TextBox4.value) helmekki[_26_] Excel Programming 2 October 14th 04 05:23 AM
x = textbox1.value (somethings wrong) CAA[_18_] Excel Programming 6 March 5th 04 03:24 PM
Highlighting Textbox1 Value when form initializes. Todd Huttenstine[_3_] Excel Programming 2 November 26th 03 10:35 PM
UserForm1.Textbox1.SetFocus Question Zane Greer Excel Programming 1 September 14th 03 11:59 AM


All times are GMT +1. The time now is 08:06 AM.

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"