Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tdp Tdp is offline
external usenet poster
 
Posts: 74
Default Calculation not working?????????????

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Calculation not working?????????????

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Calculation not working?????????????

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   Report Post  
Posted to microsoft.public.excel.misc
Tdp Tdp is offline
external usenet poster
 
Posts: 74
Default Calculation not working?????????????

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF Function - Calculation not working Teethless mama Excel Worksheet Functions 0 March 28th 07 04:01 AM
Calculation not working Copper via OfficeKB.com New Users to Excel 4 February 22nd 06 10:11 PM
Auto Calculation not working vinnie31 Excel Worksheet Functions 1 January 10th 06 11:43 PM
Calculation with Working day of the year Box666 Excel Discussion (Misc queries) 4 November 10th 05 07:33 PM
Automatic calculation is not working susang Excel Discussion (Misc queries) 4 November 4th 05 04:51 PM


All times are GMT +1. The time now is 06:05 PM.

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"