I am using following code;
#1 It is giving error message which we need press yes
I want this error not to display.
#2 Second thing, I want to open always the folder "Thisworkbook.path/Backup"
Currently it is opening another folder, then I need to select destination again and again
Code:
Sub t()
Dim sh As Worksheet, fPath As String, fName As String
Set sh = ActiveSheet
fPath = "ThisWorkbook.Path\Backup\"
fName = Application.GetOpenFilename("Excel Files (" & fPath & "*.xlsb)," & fPath & "*.xlsb")
Set wb = Workbooks.Open(fName)
wb.Sheets("Layout").Select
Columns("BM:BO").Select
Selection.EntireColumn.Hidden = False
Range("BN5").Select
ActiveSheet.Range("$A$5:$DZ$500").AutoFilter Field:=66
Selection.EntireColumn.Hidden = True
Range("BM5").Select
Range("B6:Q498").Copy sh.Range("B6")
wb.Close False
End Sub
#1 It is giving error message which we need press yes
A formula or sheet you want to move or copy contains the name 'Stitch', which already exist on the destination worksheet. Do you want to use this version of the name?
. To use the name as defined in the destination sheet, click Yes
. To rename the range referred to in formula or worksheet, click No, and enter a new name in Name Conflict dialog box.
I want this error not to display.
#2 Second thing, I want to open always the folder "Thisworkbook.path/Backup"
Currently it is opening another folder, then I need to select destination again and again