+ Reply to Thread
Results 1 to 2 of 2

Even if someone uses the excel file, I still want to copy some rows and paste it into new

  1. #1
    Forum Contributor
    Join Date
    11-21-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    190

    Even if someone uses the excel file, I still want to copy some rows and paste it into new

    Hi,
    I want to copy some rows even if that excel using by some one.
    I used below code;

    Set wbSource = Workbooks.Open("C:\Documet\Share Document\MonthlyReport.xlsm", Password:="xxxx", ReadOnly:=True)

    wbSource is workbook.

    When someone is using, I want to open as 'ReadOnly', but I got an error "Runtime 9, script out of range".
    When nobody is using, then this code works well.

    What is wrong and how can I fix this problem?

    Thanks

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Even if someone uses the excel file, I still want to copy some rows and paste it into

    Add this code into Workbook section

    Please Login or Register  to view this content.
    When file is already in use you will be alerted

+ 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] Copy the data from Master file and paste into individual excel file as per criteria
    By Vikas_k in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-30-2023, 09:15 AM
  2. first copy data from each excel file and paste it to another file.
    By amarjeet.it in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-16-2013, 06:24 AM
  3. Copy data from other excel file and paste it to other excel file
    By puuts in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-12-2013, 02:54 PM
  4. Copy specific rows from many files and paste into next empty row in master file
    By Rednalyn in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-08-2013, 09:13 AM
  5. Replies: 1
    Last Post: 10-01-2012, 11:11 PM
  6. macro to open, copy paste from existing excel file to a new blank file
    By 2blessed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2012, 06:05 PM
  7. Replies: 1
    Last Post: 10-17-2005, 04:05 AM

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