Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help

Maybe...

textbox5.text=format( formula, "0.00%")

And you may not need those intermediate variables, too:

Option Explicit

Private Sub CommandButton1_Click()

TextBox5.Value _
= Format((Me.TextBox4.Value _
/ ((Me.TextBox1.Value * Me.TextBox2.Value * 1000000) _
* Me.TextBox3.Value)), "0.0%")

End Sub

But I would add some checks for numbers for each of those textboxes.

saziz wrote:

Dave,
Thank you for the help.
What could be the format for % for textbox5 value?
I am trying this:
textbox5.text=format( formula, "%")
It gives me error.
Thnaks once again for your help.
Syed

--
saziz
------------------------------------------------------------------------
saziz's Profile: http://www.excelforum.com/member.php...fo&userid=6350
View this thread: http://www.excelforum.com/showthread...hreadid=477205


--

Dave Peterson
 
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



All times are GMT +1. The time now is 09:16 AM.

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

About Us

"It's about Microsoft Excel"