Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default VBA code to update sheets in manual calc workbook

Hi,

I have a bit of an odd problem that has been bugging me for a few days
with so far no solution.

I have a large workbook that needs to run in manual calculation mode
where certain sheets are updated in a particular order using shift-F9.
I am trying to get some code to work that when one of these sheets is
updated it in turn initiates the update of another sheet (not part of
the order, although it may have to be if I can't get this work).

I am using the worksheets("Name").Calculate function to update the
other sheet and I have tried both calling it within a function and
then placing the function call in one of the cells on the first sheet.

excel
cell A1 =refresh_sheet()

vba
Function refresh_sheet()
worksheets("Name").Calculate
End Function

I have also tried using a cell change event private sub within the
sheet and referencing it to a volatile cell with the now() function in
it so that when shift-F9 is run it triggers the macro.

excel
cell A1 = Now()

vba
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
worksheets("Name").Calculate
End if

The problem seems to be that when I activate these from within excel,
either by shift-F9 or an F2-Enter refresh on the cell it doesn't
appear to run the command. However if I run the code from the vba
window (play button/F5) it works. I know that it has to be something
simple that I am missing.

If anyone knows how to fix this or can even offer another solution to
this problem that would be great.

Thanks in advance

Dwight
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
check if excel sheet in manual calc mode Dan Excel Programming 1 January 23rd 08 05:33 AM
Calc = Manual & Do Not Calc b/4 SAVE Ken Excel Discussion (Misc queries) 0 October 3rd 07 02:28 PM
Data entry too slow even with calc set to manual [email protected] Excel Discussion (Misc queries) 1 September 22nd 06 11:00 AM
Open CSV causes calculation in manual calc mode [email protected] Excel Discussion (Misc queries) 0 July 25th 06 09:22 PM
Automatic Manual Calc When Opening!! twogoodtwo[_4_] Excel Programming 3 November 10th 05 06:12 PM


All times are GMT +1. The time now is 06:19 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"