Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checkbox and inputing answer into a specific cell
I hope you guys can help me out
I have a checkbox that included the tax with the orinigal price if the checkbox is checked or =True. I have the checkbox code written in the sheet. I have the tax code written in module "Mod1" I am having trouble in getting it work. When i compile it now i get an compile error stating "Expected Function or Variable". Which i dont understand What is wrong in my code. Here is the code for the checkbox. Public Sub CheckBox41_Click() Dim CheckBoxVT As Variant CheckBoxVT = CheckBox41.Value Application.Run(Mod1.Tax) End Sub Here is the Tax code located in Module "Mod1" Option Explicit Public Sub Tax() Dim StateTax As Range Dim CountyTax As Range Dim VM As Range Dim OP As Range Dim VC As Variant Dim VS As Variant Dim OC As Variant Dim OS As Variant Dim TST As Variant Dim TCT As Variant Dim CheckBoxVT As Variant Dim CheckBoxOT As Variant Set StateTax = Worksheets("BID RECAP SUMMARY").Range("E37") Set CountyTax = Worksheets("BID RECAP SUMMARY").Range("E38") Set VM = Worksheets("BID RECAP SUMMARY").Range("I18") Set OP = Worksheets("BID RECAP SUMMARY").Range("I33") Select Case CheckBoxVT Case Is = True VS = StateTax * VM VC = CountyTax * VM Case Is = False VS = 0 VC = 0 End Select Select Case CheckBoxOT Case Is = True OS = StateTax * OP OC = CountyTax * OP Case Is = False OS = 0 OC = 0 End Select TST = VS + OS TCT = VC + OC Worksheets("BID RECAP SUMMARY").Range("g37").Value = TST Worksheets("BID RECAP SUMMARY").Range("g38").Value = TCT End Sub Thanks in advance for the help guys!! Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checkbox and inputing answer into a specific cell
Hi Andy,
I think the problem is created by Application.Run(Mod1.Tax) What happens if you just change that whole line to Tax Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I get a macro to populate the answer into one specific cel | Excel Discussion (Misc queries) | |||
Not allowing to continu unless a specific cell has specific answer | Excel Discussion (Misc queries) | |||
Link from a specific Cell in Excel to a specific para. in Word | Excel Worksheet Functions | |||
matching values and inputing value in the adjacent cell | Excel Programming | |||
How do I Paste thie answer into specific cell using vb...tia sal | Excel Programming |