Adjust code to cater for multiple combo boxes

sueanne

Board Regular
Joined
Apr 2, 2014
Messages
81
Hi,

I am having great difficulty trying to work out how to calculate GST on a userform. I apologise for the duplicate post, however the other post probably didn't explain it very well.

I have managed to get the code below to work for cboTax1 however I cannot work out how to adjust this code to cater for multiple combo boxes.
By that I mean, I have cboTax1-10 and I need to perform this calculation for all 10 boxes and put the total of the results to Taxamt Textbox.

Code:
Private Sub cboTax1_change()
If cboTax1.Value = "GST Free" Then
 Taxamt1 = "$0.00"
Else
Taxamt1 = (Total1.Value * (10 / 100))
 End If
Taxamt.Value = Format(Taxamt1, "$#,##0.00")
 End Sub

If anyone can please help that would be greatly appreciated, I have been searching the net for days now, but just cant find anything that works for what I want. Maybe I cant do it how I want? 

Thanks so much!
Sue-Anne
 
I have found a couple of things that are not quite working, here is a summary below. I am still working on these however I haven't had any luck so far;
a) Total calculation is not deducting the discount as a percentage, it is deducting it as a number. ie 1% as 1, 2% as 2
b) You can enter in a unit price as 56.30 (without the $ sign, if you enter with a $ sign, then total doesn't have a $ sign), however the total doesn't calculate with the cents, only the dollars. It shows up as $56.00 but not $56.30
c) The unit price field can have text or numbers in it, I want to limit it to numerical only and a warning pop up if not numerical (similar to one with Qty)

Thanks again for all your help!
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi pike,

I don't have permissions to attach it on the forum as far as I can see. More than happy to share so people can help, do you know how I can do this? I appreciate all the help I can get ;-)
 
Upvote 0
Hi pike & hippiehacker,

Thank you both for your assistance, I have managed to get these issues resolved. All time and efforts are much appreciated.
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,112
Members
452,302
Latest member
TaMere

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top