sq30
asked on
Open file and copy sheet from newly opened workbook the close.
Hello,
Please help me expand the code below to copy sheet 1 from the newly opened file to the current file and then close the newly opened file.
Thank you
Please help me expand the code below to copy sheet 1 from the newly opened file to the current file and then close the newly opened file.
Thank you
Sub ImportSheet()
Dim fileName
fileName = Application.GetOpenFilename("Other Workbook (*.xl*),*.xl*")
If fileName = "False" Then
MsgBox "You have not selected a file. Please try again."
GoTo QuitSub
End If
Workbooks.Open fileName:=fileName
QuitSub:
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER