J
Jahsonn
Hi Experts
The following code should open wb FNAME and then the
Delete sheet who's name is in cell G10 in worksheet
CONTROL. It opens the FNAME sheet but it is not deleting
sheet REMITID.
Can anyone help?
Sub Cleardown_Remit()
RemitID = Worksheets("Control").Range("G10").Value
fname = Worksheets("Control").Range("H10").Value
With Application
..ScreenUpdating = False
..DisplayAlerts = False
End With
Set oWb = Workbooks.Open(fname)
Worksheets(RemitID).Delete
oWb.Close
With Application
..ScreenUpdating = True
..DisplayAlerts = True
End With
End Sub
The following code should open wb FNAME and then the
Delete sheet who's name is in cell G10 in worksheet
CONTROL. It opens the FNAME sheet but it is not deleting
sheet REMITID.
Can anyone help?
Sub Cleardown_Remit()
RemitID = Worksheets("Control").Range("G10").Value
fname = Worksheets("Control").Range("H10").Value
With Application
..ScreenUpdating = False
..DisplayAlerts = False
End With
Set oWb = Workbooks.Open(fname)
Worksheets(RemitID).Delete
oWb.Close
With Application
..ScreenUpdating = True
..DisplayAlerts = True
End With
End Sub