+ Reply to Thread
Results 1 to 5 of 5

Correct the codes - Open, copy & Paste

  1. #1
    Registered User
    Join Date
    04-22-2014
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    14

    Correct the codes - Open, copy & Paste

    Hi Guys,

    Coding for opening the excel file and copy the range from sheet 1 to another workbook and then close it.

    I have come across for opening the workbook, but how do i copy the range till the recent row used in the workbook and close it.

    Code:

    Please Login or Register  to view this content.
    Tried with activating the sheet, but most of the times it resulted in error saying that object is not set & etc..

    Thanks,
    Kit
    Last edited by arlu1201; 04-25-2014 at 12:11 PM. Reason: Use code tags.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,626

    re: Correct the codes - Open, copy & Paste

    1) use code tags - it is required by forum rules. so please edit your post.

    2) as oWS is neither declared nor assigned it contains null so you try to activate here
    Please Login or Register  to view this content.
    non existing Sheet0
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-22-2014
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    14

    Unhappy re: Correct the codes - Open, copy & Paste

    Hi,

    Here the picture of the code.

    Please Login or Register  to view this content.

    I have tried to perform in different way, by giving the range to copy from the target sheet to master sheet, but there too some coding is missing out.

    Well is it there any chance to set the pre-defined set of columns & rows to copy (till the last recent used row) and paste it in the master sheet, then do loop the same senario.

    Code tags done...

    Thanks,
    Kit
    Last edited by kit370; 04-25-2014 at 02:01 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    re: Correct the codes - Open, copy & Paste

    Hi,

    As has been mentioned, you need to add code tags - see forum rules.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    04-22-2014
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    14

    re: Correct the codes - Open, copy & Paste

    Code tags done..

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Open specific folder, select file to open and copy then paste
    By Kranky in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-22-2012, 12:14 AM
  2. [SOLVED] Find all cells with a specific background color then copy/paste to correct column
    By d_rose in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-20-2012, 10:18 AM
  3. Copy & Paste text using VBA codes
    By mvel_sky in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2009, 06:17 AM
  4. copy paste codes
    By Taru in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2006, 02:38 PM

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