Hi All,
Need anyone's help to view this VBA code.
I'm not sure what's wrong. Repeated edits, but still came out error #9.
Sub datasheet()
Application.DisplayAlerts = False
Worksheets(Array("FG_Store Bundle", "FG _Ship Bundle")).Delete --> Is there something wrong here ??
Application.DisplayAlerts = True
Workbooks("FG_Store Bundle.csv").Worksheets("FG_Store Bundle").Copy After:=Workbooks("FG Database Bundle.xlsm").Worksheets("Database")
Workbooks("FG_Ship Bundle.csv").Worksheets("FG_Ship Bundle").Copy After:=Workbooks("FG Database Bundle.xlsm").Worksheets("FG_Store Bundle")
Dim bk As Workbook
For Each bk In Workbooks
If Not (bk Is ThisWorkbook) Then
bk.Close SaveChanges:=False
End If
Next
Workbooks("FG Database Bundle.xlsm").Activate
Worksheets("cover sheet").Activate
End Sub
Need anyone's help to view this VBA code.
I'm not sure what's wrong. Repeated edits, but still came out error #9.
Sub datasheet()
Application.DisplayAlerts = False
Worksheets(Array("FG_Store Bundle", "FG _Ship Bundle")).Delete --> Is there something wrong here ??
Application.DisplayAlerts = True
Workbooks("FG_Store Bundle.csv").Worksheets("FG_Store Bundle").Copy After:=Workbooks("FG Database Bundle.xlsm").Worksheets("Database")
Workbooks("FG_Ship Bundle.csv").Worksheets("FG_Ship Bundle").Copy After:=Workbooks("FG Database Bundle.xlsm").Worksheets("FG_Store Bundle")
Dim bk As Workbook
For Each bk In Workbooks
If Not (bk Is ThisWorkbook) Then
bk.Close SaveChanges:=False
End If
Next
Workbooks("FG Database Bundle.xlsm").Activate
Worksheets("cover sheet").Activate
End Sub