Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Main page Recalculations

Hi,

I have a 'Main Page' which contains cells linked to and from various
individual worksheets. I had some trouble with volatile functions. I found
them and removed them. The workbook worked great...Until I performed a file
save as.

Then all Worksheet calculation code for all pages runs everytime a change is
made to 'Main Page', even to an empty cell that is not linked to anything.
If I save the workbook, close it and reopen it, it reverts to working
correctly. Then if I change an unlinked cell nothing happens.

If I make a change to a cell that should trigger the other worksheet
calculates, they run as they should...but they don't stop running. Again, if
I make a change to an empty unlinked cell all the code runs, until I again
save the workbook, close it and reopen it. Then it works correctly again.

Does anyone have any suggestions?
--
Thanks for your help.
Karen53
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Main page Recalculations

Hi,

I"ve noticed that if I change the Worksheet calculation code on one of my
worksheets, it stops.

This is a worksheet calculate where if I change
ShName = Me.Name
to
ShName = CAMMaster.Name
the problem seems to resolve.

Private Sub Worksheet_Calculate()

Dim ShName As String

ShName = Me.Name

Debug.Print "Start Worksheet Calculate " & ShName

Call CurrentStatus.WkSheetCalc(ShName)

End Sub


If I step through the code below and the above code is using Me.Name it
triggers the above code. If the above code is change to CAMMaster.Name, the
below code does not trigger it.

Private Sub Worksheet_Calculate()

Dim CLusedrow As Long
Dim TLusedrow As Long
Dim CAMLICount As Long
Dim TaxLICount As Long

'get the CAM last used row
CLusedrow = LineItemspg.Cells(Rows.Count, "C").End(xlUp).Row
CAMLICount = CLusedrow - 14

'get the Tax last used row
TLusedrow = LineItemspg.Cells(Rows.Count, "H").End(xlUp).Row
TaxLICount = TLusedrow - 14

LineItemspg.Range("M5").Value = CAMLICount
LineItemspg.Range("N5").Value = TaxLICount

End Sub

I was using Me on a lot of the Object modules, so I changed them to be
specific. It doesn't seem Me is as specific as I thought. Would someone be
able to explain to me what and why this is happening?
--
Thanks for your help.
Karen53


"Karen53" wrote:

Hi,

I have a 'Main Page' which contains cells linked to and from various
individual worksheets. I had some trouble with volatile functions. I found
them and removed them. The workbook worked great...Until I performed a file
save as.

Then all Worksheet calculation code for all pages runs everytime a change is
made to 'Main Page', even to an empty cell that is not linked to anything.
If I save the workbook, close it and reopen it, it reverts to working
correctly. Then if I change an unlinked cell nothing happens.

If I make a change to a cell that should trigger the other worksheet
calculates, they run as they should...but they don't stop running. Again, if
I make a change to an empty unlinked cell all the code runs, until I again
save the workbook, close it and reopen it. Then it works correctly again.

Does anyone have any suggestions?
--
Thanks for your help.
Karen53

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
on your main page click on the worksheet name and be taken to it chiefrockeruk Excel Worksheet Functions 2 May 20th 08 05:40 PM
Main Page Button In excel Andy Excel Programming 4 May 3rd 06 07:39 PM
display main column on next page jujumyamom Excel Discussion (Misc queries) 1 September 22nd 05 06:10 PM
Return to Main Page oberon.black[_37_] Excel Programming 1 September 11th 05 05:18 PM
how do I merge total from many pages into one main page in excel? JER Excel Discussion (Misc queries) 1 May 6th 05 03:29 PM


All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"