Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Updating charts when Manual Calculation enabled

Hi. In Excel 2003, I have a workbook in which I've set up several sumproduct
formulae to be utilized in a chart. Additionally I have a macro that will
hide columns for which the sumproduct = 0. There was a delay when adding new
data to the source page, so I turned on Manual calculate which immediately
corrected that issue. However, when I run the macro, which begins with a
command to calculate, the chart will not update to show the new columns of
data until I run the macro a second time, even though the column is no longer
hidden in the data page. I've included the code below. Is there a way to
force the chart to update in the macro? Thanks, in advance.

Sub hideconfigcolumns()
Sheets("Machine Types Charted").Select
Calculate
Columns("m:as").Select
Selection.EntireColumn.Hidden = False
With ActiveSheet
For i = 13 To 50
If Cells(16, i) = 0 Then
Cells(1, i).EntireColumn.Hidden = True
End If
Next
End With
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Updating charts when Manual Calculation enabled

Just add another calculate command after you unhide the cells. Otherwise, the
chart never receives the signal to look for new data.

Sub hideconfigcolumns()
Sheets("Machine Types Charted").Select
Calculate
Columns("m:as").Select
Selection.EntireColumn.Hidden = False
With ActiveSheet
For i = 13 To 50
If Cells(16, i) = 0 Then
Cells(1, i).EntireColumn.Hidden = True
End If
Next
Calculate
End With
End Sub

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"hnyb1" wrote:

Hi. In Excel 2003, I have a workbook in which I've set up several sumproduct
formulae to be utilized in a chart. Additionally I have a macro that will
hide columns for which the sumproduct = 0. There was a delay when adding new
data to the source page, so I turned on Manual calculate which immediately
corrected that issue. However, when I run the macro, which begins with a
command to calculate, the chart will not update to show the new columns of
data until I run the macro a second time, even though the column is no longer
hidden in the data page. I've included the code below. Is there a way to
force the chart to update in the macro? Thanks, in advance.

Sub hideconfigcolumns()
Sheets("Machine Types Charted").Select
Calculate
Columns("m:as").Select
Selection.EntireColumn.Hidden = False
With ActiveSheet
For i = 13 To 50
If Cells(16, i) = 0 Then
Cells(1, i).EntireColumn.Hidden = True
End If
Next
End With
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Updating charts when Manual Calculation enabled

Wow! Too easy :-) Thank you very much!

"Luke M" wrote:

Just add another calculate command after you unhide the cells. Otherwise, the
chart never receives the signal to look for new data.

Sub hideconfigcolumns()
Sheets("Machine Types Charted").Select
Calculate
Columns("m:as").Select
Selection.EntireColumn.Hidden = False
With ActiveSheet
For i = 13 To 50
If Cells(16, i) = 0 Then
Cells(1, i).EntireColumn.Hidden = True
End If
Next
Calculate
End With
End Sub

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"hnyb1" wrote:

Hi. In Excel 2003, I have a workbook in which I've set up several sumproduct
formulae to be utilized in a chart. Additionally I have a macro that will
hide columns for which the sumproduct = 0. There was a delay when adding new
data to the source page, so I turned on Manual calculate which immediately
corrected that issue. However, when I run the macro, which begins with a
command to calculate, the chart will not update to show the new columns of
data until I run the macro a second time, even though the column is no longer
hidden in the data page. I've included the code below. Is there a way to
force the chart to update in the macro? Thanks, in advance.

Sub hideconfigcolumns()
Sheets("Machine Types Charted").Select
Calculate
Columns("m:as").Select
Selection.EntireColumn.Hidden = False
With ActiveSheet
For i = 13 To 50
If Cells(16, i) = 0 Then
Cells(1, i).EntireColumn.Hidden = True
End If
Next
End With
End Sub

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
Excel Manual Calculation Brandon Excel Worksheet Functions 4 April 25th 08 07:16 PM
Manual Calculation TeresaD Setting up and Configuration of Excel 7 January 28th 08 08:54 PM
Manual control of link updating for downloaded quotes? dk_ Excel Discussion (Misc queries) 9 November 15th 06 01:04 PM
Calculation set as Manual Dan. Excel Discussion (Misc queries) 1 February 14th 06 04:30 PM
Manual calculation does not work Hmmmm Excel Discussion (Misc queries) 3 February 17th 05 08:07 AM


All times are GMT +1. The time now is 01:28 AM.

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"