Trying to copy a worksheet name "Headings Explanations" from the current workbook "Create Report.xlsm" that is open to a work book that i have asked to be opened I get subscript out of range error
Private Sub CommandButton2_Click()
Dim myfile As String
myfile = Application.GetOpenFilename(Title:="Please choose a file to open", FileFilter:="Excel Files *.xls* (*.xls*),")
Workbooks.Open Filename:=myfile
Workbooks("Create Report.xlsm").Sheets("Headings Explanations").Copy After:=Workbooks(myfile).Sheets(Sheet.Count)
End Sub