Please assist, i have a macro that works perfectly fine with one workbook (ADH Feb'13 new WorkfileDownload.xlsm) but refuses to ran with the other ones (ILA Feb'13 WorkfileDownload.xlsm, CBH Feb '13 WorkfileDownload.xlsm, etc).
The problem i figured out is that may be i Dim only one file name, so how do i strFileFrom to include every open/active workbook.
Sub Macro1()
Dim strFileFrom As String
Dim strFileTo As String
strFileFrom = "ADH Feb'13 new WorkfileDownload.xlsm"
strFileTo = "Template.xlsx"
Windows(strFileFrom).Activate
Sheets("Top 20 Line Entries").Select
Range("B3:B22").Select
Application.CutCopyMode = False
Selection.Copy
Windows(strFileTo).Activate
Sheets("Top 20 Line Entries").Select
Range("B14").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
Bookmarks