Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Return a formula

Is there any way to force this to be a formula when it is placed in cell B3?
I want someone to be able to enter say 10 + 10 and have the result be 20 in
cell B3. I know you can enter =10+10 and it will return 20, but I can not
count on everyone remembering (knowing to use) the = sign.

Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Worksheets("Income").Range("B3").Value = TextBox80.Value

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Return a formula

i changed it up because i don't have your code, but this worked for me when i
clicked a commandbutton on the form after entering 10+10 into textbox1

Private Sub CommandButton1_Click()
Worksheets("Sheet2").Range("B3").Formula = "=" & UserForm1.TextBox1.Value
End Sub

--


Gary


"Patrick Simonds" wrote in message
...
Is there any way to force this to be a formula when it is placed in cell B3? I
want someone to be able to enter say 10 + 10 and have the result be 20 in cell
B3. I know you can enter =10+10 and it will return 20, but I can not count on
everyone remembering (knowing to use) the = sign.

Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Worksheets("Income").Range("B3").Value = TextBox80.Value

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Return a formula

Thanks.

This is how the finished code looked:

Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i changed it up because i don't have your code, but this worked for me when
i clicked a commandbutton on the form after entering 10+10 into textbox1

Private Sub CommandButton1_Click()
Worksheets("Sheet2").Range("B3").Formula = "=" & UserForm1.TextBox1.Value
End Sub

--


Gary


"Patrick Simonds" wrote in message
...
Is there any way to force this to be a formula when it is placed in cell
B3? I want someone to be able to enter say 10 + 10 and have the result be
20 in cell B3. I know you can enter =10+10 and it will return 20, but I
can not count on everyone remembering (knowing to use) the = sign.

Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Worksheets("Income").Range("B3").Value = TextBox80.Value

End Sub





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Return a formula

glad you got it working.

--


Gary


"Patrick Simonds" wrote in message
...
Thanks.

This is how the finished code looked:

Worksheets("Income").Range("B3").Formula = "=" & TextBox80.Value


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i changed it up because i don't have your code, but this worked for me when i
clicked a commandbutton on the form after entering 10+10 into textbox1

Private Sub CommandButton1_Click()
Worksheets("Sheet2").Range("B3").Formula = "=" & UserForm1.TextBox1.Value
End Sub

--


Gary


"Patrick Simonds" wrote in message
...
Is there any way to force this to be a formula when it is placed in cell B3?
I want someone to be able to enter say 10 + 10 and have the result be 20 in
cell B3. I know you can enter =10+10 and it will return 20, but I can not
count on everyone remembering (knowing to use) the = sign.

Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)

Worksheets("Income").Range("B3").Value = TextBox80.Value

End Sub







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
Return Formula willemeulen[_5_] Excel Worksheet Functions 8 May 15th 09 10:08 AM
if formula return Theresa Excel Discussion (Misc queries) 4 September 16th 08 03:53 PM
Formula to Return Last Non-Zero Value in Row Ken Hudson Excel Worksheet Functions 4 November 15th 06 05:31 AM
Why does my formula return zero? was Excel Discussion (Misc queries) 11 May 26th 05 09:49 PM
Date formula...help with return on formula Juco Excel Worksheet Functions 2 January 28th 05 09:28 PM


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