Results 1 to 5 of 5

using variable for open workbooks

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    using variable for open workbooks

    I am conversant with excel vba

    my code statements like this

    dim imp1  as workbook, imp2 as workbook,j as integer
    set imp1=workbopks("mybook1.xls")
    set imp2=workbooks("mybook2.xls")
    for j =1 to 2
    
    with workbooks ("imp" &  j)
    the last line gives error "subscription out of range"


    how to solve the problem(personal.xls file is also open and the above code is parked in that file)
    Last edited by venkat1926; 12-18-2010 at 12:52 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1