Morning,
I have developed the following Macro in order to- update, hide some columns and save the file.
But, it keeps giving me the following error: This action will cancel pending data updates. Would you like to continue?- And, it does not matter whether yes or no, because the data is not refreshed.
Any idea why the code breaks??
Thanks!!
I have developed the following Macro in order to- update, hide some columns and save the file.
But, it keeps giving me the following error: This action will cancel pending data updates. Would you like to continue?- And, it does not matter whether yes or no, because the data is not refreshed.
Any idea why the code breaks??
Code:
Sub Actualizar_Ocultar_Guardar()'
' Actualizar_Ocultar_Guardar Macro
'
'
ActiveWorkbook.RefreshAll
Columns("B:B").Select
Selection.EntireColumn.Hidden = True
Columns("E:E").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 4
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
Columns("J:J").Select
Range("J4").Activate
Selection.EntireColumn.Hidden = True
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 1
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1
Columns("G:G").Select
Selection.EntireColumn.Hidden = True
Columns("F:F").Select
Selection.EntireColumn.Hidden = True
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1
Range("C6").Select
ActiveWorkbook.Save
End Sub
Thanks!!