Hi All -
I just wrote a simple formatting macro, but have a small problem. The name of the workbook is referenced below after "Windows("
The only thing is that the name of the workbook will change, so when I run the macro on a different workbook the macro bombs out.
How do I set the "Window" name to a universal name, so it will change to whatever the new workbook is named.
TIA - KTS.
ActiveSheet.ChartObjects("Chart 13").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets("Hypotheticals").Range("D35:U40"), _
PlotBy:=xlRows
Windows("SVS II Davis Venture Value Portfolio.xls").SmallScroll ToRight:=-10
I just wrote a simple formatting macro, but have a small problem. The name of the workbook is referenced below after "Windows("
The only thing is that the name of the workbook will change, so when I run the macro on a different workbook the macro bombs out.
How do I set the "Window" name to a universal name, so it will change to whatever the new workbook is named.
TIA - KTS.
ActiveSheet.ChartObjects("Chart 13").Activate
ActiveChart.PlotArea.Select
ActiveChart.SetSourceData Source:=Sheets("Hypotheticals").Range("D35:U40"), _
PlotBy:=xlRows
Windows("SVS II Davis Venture Value Portfolio.xls").SmallScroll ToRight:=-10