+ Reply to Thread
Results 1 to 4 of 4

To Copy ranges from multiple workbooks to one sheet

  1. #1
    Registered User
    Join Date
    02-18-2009
    Location
    Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    4

    To Copy ranges from multiple workbooks to one sheet

    The code below copies range "e11,i11,m11,a15,f15,k15,a19,a20,b21,b22,f19,f20,g21,g22,m19,m20,m21,l22,c25,c26,c27,c28,h25,h26,h27,m25,m26,m27,a33:n37" from sheet named "form" of every workbook in the folder which I specify (through browse).And paste the data in the open workbook in sheet named "Data". It is ok and as per my requirement. But I want that instead of using sheet name "form" there should be sheet index i.e I want to copy data from sheet1 of every workbook instead of sheet name "Form" of every workbook in the specified folder, rest of the process is ok. This code 95% fits to my requirement except that I want to use sheet index instead of sheet name. I think something needs to be done with the line ShName = "Form".
    Please Login or Register  to view this content.
    Last edited by royUK; 03-19-2009 at 03:23 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: To Copy ranges from multiple workbooks to one sheet

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    I will add them this time
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    05-28-2008
    Posts
    13

    Re: To Copy ranges from multiple workbooks to one sheet

    Are you going to copy all sheets in the workbook or the first sheet alone

    if it is firstsheet then you need to open the excel workbook JustFileName and get the sheet1's name :

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-18-2009
    Location
    Pakistan
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: To Copy ranges from multiple workbooks to one sheet

    Thanks for the answer. I am no very familiar with Macros. Please tell me to how and where should I use this Code in my existing code.

    Thanks

+ Reply to Thread

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