View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Updating Calculations

The command should be:

Application.Run "'" & bk.name & "'!OnGradeMain"

Well, the calculation updates wouldn't work. I only suggested them based on
your description. You never mentioned that in each workbook, after clicking
it, you went to Tools=Macro=Macros, selected the OnGradeMain macro for the
current workbook and hit the run button.


The instances of the Workbook with the Chart macros won't update until I
click individually on them. So I need to click on each one of them to
update the "Summary" Workbook properly.


See mentioned anywhere of manually running macros?

--
Regards,
Tom Ogilvy



"Fred Ernst" wrote in message
...
The calculation updates did not work for me.

I turned on the macro recorder and repeated the action that causes the
Chart Workbook to run and for my my "Summary" workbook to hence update,
and this is what it recorded. Now I'm just trying to get it to loop
through all the open workbooks and run that macro !OnGradeMain.

However I'm finding it a callenge to get the filename and macro name into
the Application.Run function properly

From the Macro Recorder:

Windows("d10-Street Capacity-35th-Street-Vertical
Curb-UD-Inlet_v2.14a.xls"). _
Activate
Application.Run _
"'d10-Street Capacity-35th-Street-Vertical
Curb-UD-Inlet_v2.14a.xls'!OnGradeMain"
Windows("Hydrology Summary.xls").Activate

My Attempt so far, no luck yet:

Sub FullUpdate()
Dim bk As Workbook
For Each bk In Workbooks
If LCase(bk.Name) < "hydrology summary.xls" Then
Windows(bk.Name).Activate
Application.Run "" '" & bk.name & "'" & " !OnGradeMain"
End If
Next
Windows("Hydrology Summary.xls").Activate
End Sub

Thanks,
Fred