Hi all!
What i am trying to do is to insert some columns on the left side of the D column. But i was stuck in the error number 1004. And i really don't know how to debug.
My codes are below
The error was flagged right on the line of the Insert method.Code:Set xlsApp = New Excel.Application Set xlsWkb = xlsApp.Workbooks.Open(filename) Set xlsSht = xlsWkb.Sheets(1) tenTemp = xlsSht.Name With xlsSht .Rows("1:5").Delete .Columns("D:e").Select .Columns.Insert Shift:=xlToRight end with
If anyone have done this before, please tell me how to debug this.
Thank you so much.




Reply With Quote