Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following macro:
Sub Macro2() Dim datestamp As String Dim link As String datestamp = Format(Date, "yyyy_mm_dd") link = "Arrestments Planning Model " & datestamp & ".xls" ActiveWindow.ScrollWorkbookTabs Position:=xlLast Sheets("Centre Summary Plan").Select Range("E5").Select Windows("Planning Model.xls").Activate Windows(link).Activate Application.Run _ "'link'!Plan_Weekly_Summary" Range("E39").Select Windows("Planning Model.xls").Activate ActiveCell.FormulaR1C1 = _ "='[link]Summary Plan'!R26C4" Range("E6").Select ActiveCell.FormulaR1C1 = _ "='[link]Summary Plan'!R28C4" Range("E5").Select End Sub The dim link is showing the correct file name but the code debugs at Windows(link).Activate. Can anyone help? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro in 2nd Open workbook | Excel Discussion (Misc queries) | |||
Open Workbook Macro??? | Excel Discussion (Misc queries) | |||
Run a macro when I open a workbook | Excel Discussion (Misc queries) | |||
Macro to open most recent file with a particular filename string | Excel Discussion (Misc queries) | |||
How to Run Macro in open workbook/s | Excel Discussion (Misc queries) |