Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following code. The trouble is that it is not calculating the sum.
The figure in cell BY7 is not changing...................Any ideas?? Private Sub SpinButton2_Change() Application.Calculation = xlCalculationManual Worksheets("Sheet4").Range("BY7").Value = SpinButton2.Value Worksheets("Sheet4").Range("BY6").Value = ((Worksheets("Sheet4").Range("BY2") - Worksheets("Sheet4").Range("BY7")) * 28) Application.Calculation = xlCalculationAutomatic End Sub ps: There is a textbox that is linked to cell BY7. It just displays the value by code. -- Tdp |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi
i don't work with spin buttons much but i do think it has to be linked to a cell in order to show it's value which high, low and step values are set in the spin button properite sheet. is the spin button linked to BY7? if so, it would see you have a round robin conflict. where does the text box get it's value? Regards FSt1 "Tdp" wrote: I have the following code. The trouble is that it is not calculating the sum. The figure in cell BY7 is not changing...................Any ideas?? Private Sub SpinButton2_Change() Application.Calculation = xlCalculationManual Worksheets("Sheet4").Range("BY7").Value = SpinButton2.Value Worksheets("Sheet4").Range("BY6").Value = ((Worksheets("Sheet4").Range("BY2") - Worksheets("Sheet4").Range("BY7")) * 28) Application.Calculation = xlCalculationAutomatic End Sub ps: There is a textbox that is linked to cell BY7. It just displays the value by code. -- Tdp |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think your code would have worked OK had it been on one line or you used a
continuation character which is a space and an underscore _ However, you may like this better. Don't think you need to turn off calculation for this one item Private Sub SpinButton2_Change() 'Application.Calculation = xlCalculationManual With Worksheets("Sheet4") .Range("BY7").Value = SpinButton2.Value .Range("BY6").Value = _ (.Range("BY2") - .Range("BY7")) * 28 End With 'Application.Calculation = xlCalculationAutomatic End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Tdp" wrote in message ... I have the following code. The trouble is that it is not calculating the sum. The figure in cell BY7 is not changing...................Any ideas?? Private Sub SpinButton2_Change() Application.Calculation = xlCalculationManual Worksheets("Sheet4").Range("BY7").Value = SpinButton2.Value Worksheets("Sheet4").Range("BY6").Value = ((Worksheets("Sheet4").Range("BY2") - Worksheets("Sheet4").Range("BY7")) * 28) Application.Calculation = xlCalculationAutomatic End Sub ps: There is a textbox that is linked to cell BY7. It just displays the value by code. -- Tdp |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks to both of you for getting back so quick.
Don, I'm afraid it's still not working. The spinbutton does its job but cell BY6 value does not change as you sin up or down. Textbox1 = value of BY7 Textbox2 = value of BY6 As I spin up or down values in TB1 change but not TB2 nor on sheet4 (BY6) -- Tdp "Don Guillett" wrote: I think your code would have worked OK had it been on one line or you used a continuation character which is a space and an underscore _ However, you may like this better. Don't think you need to turn off calculation for this one item Private Sub SpinButton2_Change() 'Application.Calculation = xlCalculationManual With Worksheets("Sheet4") .Range("BY7").Value = SpinButton2.Value .Range("BY6").Value = _ (.Range("BY2") - .Range("BY7")) * 28 End With 'Application.Calculation = xlCalculationAutomatic End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "Tdp" wrote in message ... I have the following code. The trouble is that it is not calculating the sum. The figure in cell BY7 is not changing...................Any ideas?? Private Sub SpinButton2_Change() Application.Calculation = xlCalculationManual Worksheets("Sheet4").Range("BY7").Value = SpinButton2.Value Worksheets("Sheet4").Range("BY6").Value = ((Worksheets("Sheet4").Range("BY2") - Worksheets("Sheet4").Range("BY7")) * 28) Application.Calculation = xlCalculationAutomatic End Sub ps: There is a textbox that is linked to cell BY7. It just displays the value by code. -- Tdp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF Function - Calculation not working | Excel Worksheet Functions | |||
Calculation not working | New Users to Excel | |||
Auto Calculation not working | Excel Worksheet Functions | |||
Calculation with Working day of the year | Excel Discussion (Misc queries) | |||
Automatic calculation is not working | Excel Discussion (Misc queries) |