+ Reply to Thread
Results 1 to 5 of 5

Pulling Data from another workbook with VBA

  1. #1
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Pulling Data from another workbook with VBA

    I have these declarations at the beginning of my code:

    Sub Transfer__Data()
    Dim ws1 As Worksheet: Set ws1 = Sheets("Input Data")
    Dim ws2 As Worksheet: Set ws2 = Sheets("Sample Report")
    Dim dDate As Date
    Dim iShift As Integer
    Dim rFind As Range
    Dim startaddress As String

    What i would like to change what is in bold, Set ws1 = Sheets("Input Data"). This designates the worksheet "Input Data" as the source. I want to change this to a different sheet in a different workbook with know file path (example: C:\Users\Documents)

    I only want to read data from this workbook, so only open it as "Read-only"

    Thank you

  2. #2
    Registered User
    Join Date
    10-26-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007 & 10
    Posts
    19

    Re: Pulling Data from another workbook with VBA

    Please Login or Register  to view this content.
    Hope it will work for you
    Last edited by balajim; 11-05-2014 at 07:39 AM.

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007 & 10
    Posts
    19

    Re: Pulling Data from another workbook with VBA

    Let me know if u have issue on this

  4. #4
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Pulling Data from another workbook with VBA

    I like it!
    Thank you!

    One thing that is bothering me though. When i run the program it opens the external worksheet on my computer. I just want the program to pull data from the workbook and close it again WITHOUT saving. Is this possible?

  5. #5
    Forum Contributor
    Join Date
    12-18-2011
    Location
    long island
    MS-Off Ver
    365
    Posts
    236

    Re: Pulling Data from another workbook with VBA

    Never mind i figured it out.

    Thanks for the code!

+ 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. Pulling data from one workbook with multiple tabs to another workbook.
    By manzier in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2014, 03:41 PM
  2. Pulling Data from Another Workbook
    By Voluntondile in forum Excel General
    Replies: 0
    Last Post: 01-31-2013, 08:11 PM
  3. pulling data from one workbook to a sheet of another workbook
    By deelauderdale in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-23-2010, 04:39 PM
  4. Replies: 5
    Last Post: 09-30-2008, 06:38 AM
  5. Replies: 3
    Last Post: 09-30-2008, 04:58 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