M
Max
I'm trying to use the following code to select a worksheet from one opened
file to another(filename 'fName' is passed to the sub function):
FileList = Application _
.GetOpenFilename( _
FilterIndex:=1, _
Title:="Open File That Contains Anderson
List")
Workbooks.Open Filename:=FileList
Sheets("Anderson List").Select
ActiveSheet.Copy After:=Workbooks(fName).Sheets
End Sub
But I'm getting a subscript out of range error. Any ideas why?
file to another(filename 'fName' is passed to the sub function):
FileList = Application _
.GetOpenFilename( _
FilterIndex:=1, _
Title:="Open File That Contains Anderson
List")
Workbooks.Open Filename:=FileList
Sheets("Anderson List").Select
ActiveSheet.Copy After:=Workbooks(fName).Sheets
End Sub
But I'm getting a subscript out of range error. Any ideas why?