C
CAM
Hello,
I am having a problem with my coding it seems my coding in consolidation
doesn't refresh properly when I run the marco (see below), but when I go to
Data-> Consolidation and run it thru the consolidation button I have no
problems it updates properly. I am using Excel 2007. What can code can be
missing? Any tips will be appreicated. Thank you in advance.
Cheers.
Sub Refresh()
'Refresh sales connection
ActiveWorkbook.Connections("Query from SO1").Refresh
'Select sheet, cell range and clear inputted cells.
Worksheets("Revenue").Range("A359").ClearContents
'Refresh sales connection
ActiveWorkbook.Connections("Query from SO1").Refresh
ActiveWorkbook.Connections("Query from Exp_Spon").Refresh
'Revenue worksheet consolidation
Worksheets("Revenue").Range("A3").consolidate Sources:=Array( _
"'H:\NNA General Document Folder\Conference\Conference
2009\Budget\[Conference Budget Actual 2009.xlsm]Revenue'!R3C6:R200000C9" _
, _
"'H:\NNA General Document Folder\Conference\Conference
2009\Budget\[Conference Budget Actual 2009.xlsm]Revenue'!R3C11:R200000C14" _
), Function:=xlSum, TopRow:=False, LeftColumn:=True,
CreateLinks:=False
End Sub
I am having a problem with my coding it seems my coding in consolidation
doesn't refresh properly when I run the marco (see below), but when I go to
Data-> Consolidation and run it thru the consolidation button I have no
problems it updates properly. I am using Excel 2007. What can code can be
missing? Any tips will be appreicated. Thank you in advance.
Cheers.
Sub Refresh()
'Refresh sales connection
ActiveWorkbook.Connections("Query from SO1").Refresh
'Select sheet, cell range and clear inputted cells.
Worksheets("Revenue").Range("A359").ClearContents
'Refresh sales connection
ActiveWorkbook.Connections("Query from SO1").Refresh
ActiveWorkbook.Connections("Query from Exp_Spon").Refresh
'Revenue worksheet consolidation
Worksheets("Revenue").Range("A3").consolidate Sources:=Array( _
"'H:\NNA General Document Folder\Conference\Conference
2009\Budget\[Conference Budget Actual 2009.xlsm]Revenue'!R3C6:R200000C9" _
, _
"'H:\NNA General Document Folder\Conference\Conference
2009\Budget\[Conference Budget Actual 2009.xlsm]Revenue'!R3C11:R200000C14" _
), Function:=xlSum, TopRow:=False, LeftColumn:=True,
CreateLinks:=False
End Sub