Hi Santosh,

Use the following code for combo criteria - Command button 5

Private Sub CommandButton5_Click()
Dim A As Integer
Dim B As Integer
Dim c As Integer
Dim d As String
A = TextBox1.Value
B = TextBox2.Value
d = ComboBox1.Value
c = A * B
If d = "OTHERS" Then
TextBox3.Value = c * 45 / 100
Else
TextBox3.Value = c * 50 / 100
End If
End Sub

Regards,

Maries.

On Sat, Mar 19, 2011 at 6:52 PM, santosh subudhi <
santoshkumar.subu...@gmail.com> wrote:

> Hi Friends,
>
> Need a small help.
>
> Attached is a excel with a comand button which will populate a userform.
>
> In the userform there is a comand button called use combo which should
> calculate based on the combobox criteria.
>
> This is what not calculating properly.
>
> --
> Regards
> Santosh
> santoshkumar.subu...@gmail.com
>
> --
>
> ----------------------------------------------------------------------------------
> Some important links for excel users:
> 1. Follow us on TWITTER for tips tricks and links :
> http://twitter.com/exceldailytip
> 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
> 3. Excel tutorials at http://www.excel-macros.blogspot.com
> 4. Learn VBA Macros at http://www.quickvba.blogspot.com
> 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
>
> To post to this group, send email to excel-macros@googlegroups.com
>
> <><><><><><><><><><><><><><><><><><><><><><>
> Like our page on facebook , Just follow below link
> http://www.facebook.com/discussexcel
>

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Attachment: Sum in vba.xlsm
Description: Binary data

Reply via email to