Results 1 to 9 of 9

Thread: [RESOLVED] Problem with VB6 and Excel

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Location
    Viet Nam
    Posts
    142

    Resolved [RESOLVED] Problem with VB6 and Excel

    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
    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
    The error was flagged right on the line of the Insert method.
    If anyone have done this before, please tell me how to debug this.

    Thank you so much.
    Last edited by Hack; Aug 24th, 2007 at 06:02 AM. Reason: Added RESOVLED to thread title Last edited by Bahy : Today at 04:43 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width