Jediantman
New Member
Hi there,
I'm a bit of a macro novice and so I'm trying to understand why mine refuses to work.
All I need to do is copy a specific range of cells, which is common to 10 worksheets, into a master sheet. One of the conditions is that people may well be using them, so they have to be opened as read only, but that bit works fine. Once the file is open it then stops and refuses to copy the range of cells and paste them to the destination or anything else.
The code I'm currently using is below:
Workbooks.Open Filename:= _
"T:FilepathTracker Ann.xlsx" _
, ReadOnly:=True, Notify:=False
Sheets("Section 5").Select
Range("A23:CS250").Select
Selection.Copy
Windows("Datamastermacro.xlsm").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=213
Range("A251").Select
Windows("Tracker Ann.xlsx").Activate
ActiveWindow.Close
I've tried using the example on this website, using the table to establish where to copy to and from but that doesn't seem to work either.
Any help would be appreciated....
Thanks Ant
I'm a bit of a macro novice and so I'm trying to understand why mine refuses to work.
All I need to do is copy a specific range of cells, which is common to 10 worksheets, into a master sheet. One of the conditions is that people may well be using them, so they have to be opened as read only, but that bit works fine. Once the file is open it then stops and refuses to copy the range of cells and paste them to the destination or anything else.
The code I'm currently using is below:
Workbooks.Open Filename:= _
"T:FilepathTracker Ann.xlsx" _
, ReadOnly:=True, Notify:=False
Sheets("Section 5").Select
Range("A23:CS250").Select
Selection.Copy
Windows("Datamastermacro.xlsm").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.SmallScroll Down:=213
Range("A251").Select
Windows("Tracker Ann.xlsx").Activate
ActiveWindow.Close
I've tried using the example on this website, using the table to establish where to copy to and from but that doesn't seem to work either.
Any help would be appreciated....
Thanks Ant