+ Reply to Thread
Results 1 to 3 of 3

Copy from different workbook into the master workbook

Hybrid View

  1. #1
    Registered User
    Join Date
    11-06-2008
    Location
    nigeria
    Posts
    25

    Copy from different workbook into the master workbook

    Dear All,
    I what to thank you guys for your support and response to all my various issues so far, without this forum maybe i might have lost my job....anyway today i am here with one more challenge.

    I want to copy range of cells from five different workbooks into one master workbook. I have attached three of these workbook and the master workbook showing how it will look like. the workbooks are labelled 'Area A -E' and i want them to follow this sequence in the master workbook.

    the macro will be in the masterworkbook as the VB scripting page of the Area Workbooks are protected by one of our vendor who made a macro that does some other stuff with these sheets.[they refuse to release the password].

    Questions 1: Can this macro run without the master workbook being open at a set time. [This is what we actually want, for this process to be a background process]. and the workbook to be save as a webpage to another file.

    I know this might be challenging, but for you guys, i know i can get some help.

    i have this code which copy perfectly from one sheet to another sheet, but can this be adpted to fit what i want to do?


    Sub CopyRows()

    Dim DstRng As Range
    Dim I As Long
    Dim y As Long
    Dim Row As Range
    Dim SrcRng As Range
    Dim shSo As Worksheet
    Dim shDe As Worksheet, iR As Long, nR As Long



    Set SrcRng = Worksheets("Sheet1").Range("A5:A22")
    Set DstRng = Worksheets("Sheet2").Range("A2")


    For Each Row In SrcRng.Rows.EntireRow
    If WorksheetFunction.CountA(Row) <> 0 Then
    Row.Copy DstRng.Offset(I, 0)
    I = I + 1


    End If
    Next Row

    End Sub



    thanks
    Excel.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Copy from different workbook into the master workbook

    Hi
    save the attached file inside the folder containing area- A to E files and run the macro.
    Ravi
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-06-2008
    Location
    nigeria
    Posts
    25

    Re: Copy from different workbook into the master workbook

    Hi,

    the solution you gave did work, however it is pasting the name of the file in the first row of the sheet. Can this be removed?

    the other thing i will like to ask if i am not pushing my luck too far is, can this macro be set to run at a particular time of the day, say by 5pm and 5am and save the file as a html file?

    thanks.

    excel

+ 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