Hi

I am trying a save a copy of a file I am currently working on, into a different folder and while it is saving the copy into the folder I want the macro to hide
tabs X and Y (very hidden) in the copy file.

Sub CopyRenameFile()
Dim src As String, dst As String, fl As String
Dim rfl As String
'Source directory
src = Range("A43")
'Destination directory
dst = Range("A45")
'File name
fl = Range("A48")
'Rename file
rfl = Range("A50")
On Error Resume Next
    FileCopy src & "\" & fl, dst & "\" & rfl
    If Err.Number <> 0 Then
        MsgBox "Copy error: " & src & "\" & rfl
    End If
On Error GoTo 0
Dim ws As Worksheet
Application.ScreenUpdating = False
'Next
Dim sh As Worksheet
For Each sh In Sheets(Array("Y", "X"))
sh.Visible = Not sh.Visible
Next
Application.ScreenUpdating = True
End If
Next
End Sub

MsgBox "A replica of your file has been saved in the below location!!" & " " & dst & "."

Sheets("User Control").Select
[F12].Select
ActiveCell.Value = Now
[A10].Select
I will appreciate some assistance with this since my efforts below have been futile.

As always I appreciate your time;

ip_123