It seems pretty easy, but not able to find workaround.
Excel 2010. Aim: adding 22 empty columns starting from B
Error: Run-time error '1004': Insert method of Range class failed
Code:
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Sheets(1).Select
ActiveSheet.Tab.ColorIndex = xlColorIndexNone
Dim WbPresent As Workbook
Set WbPresent = ActiveWorkbook
Dim FileData As String
FileData = "160125"
Dim TabName As String
TabName = "IB Hire Plan - Hierarchy " & FileData
Workbooks.Open Filename:= _
"\\chca6030.eur.beluni.net\m137557$\Documents\Makro VBA\ATR\Taleo\*.xlsm"
Sheets("IB Hire Plan - Hierarchy").Select
Sheets(3).Activate
Sheets("IB Hire Plan - Hierarchy").Copy Before:=WbPresent.Sheets(1)
Sheets("IB Hire Plan - Hierarchy").Select
For colx = 2 To 23
Columns(colx).Insert Shift:=xlToRight
Next*
Was checking similar question, but did not find the good answer for that.