+ Reply to Thread
Results 1 to 5 of 5

Macro to pull data from another workbook

  1. #1
    Registered User
    Join Date
    06-29-2013
    Location
    India
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    11

    Macro to pull data from another workbook

    Hi,

    I'm trying to figure out a macro which will help me to pull data from another workbook and past it in A10 (in attached WB). For example, in combo box if i select Master WB 1 then the macro should copy the information from sheet 1 in Master WB 1 and paste it in current WB (attached WB) in A10. Similarly if i select Master WB 2 from the combo box then the macro should copy the information from sheet 1 in Master WB 2 and paste it in current WB in A10 (not beneath as i don't want to see the data of Master WB 1 when i select Master WB 2 or other).
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro to pull data from another workbook

    Assign this macro to the dropdown control.

    Change the folder path within the code of the master workbook files to suit.

    The macro assumes the value in the drop down is the filename & .xlsx e.g.; Master workbook1.xlsx
    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    06-29-2013
    Location
    India
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    11

    Re: Macro to pull data from another workbook

    You are awesome. The macro is working perfectly as i needed. Thanks a ton

  4. #4
    Registered User
    Join Date
    06-29-2013
    Location
    India
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    11

    Re: Macro to pull data from another workbook

    Hi, The above macro is working fine however i getting a popup message all the time when i run the macro. The message is "There is a large amount of information on the clipboard. Do you want to paste this information into another program later?" and it's asking for Yes or No. To get rid of this i have used Application.CutCopyMode = False but still i couldn't fix it. Is there a way to fix this?

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro to pull data from another workbook

    Quote Originally Posted by logesh excel View Post
    Hi, The above macro is working fine however i getting a popup message all the time when i run the macro. The message is "There is a large amount of information on the clipboard. Do you want to paste this information into another program later?" and it's asking for Yes or No. To get rid of this i have used Application.CutCopyMode = False but still i couldn't fix it. Is there a way to fix this?
    Did you put it just before the copy or just after the paste? I think one or both should fix it.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-29-2013
    Location
    India
    MS-Off Ver
    Excel 2003 and Excel 2007
    Posts
    11

    Re: Macro to pull data from another workbook

    Oh yeah.. got it where did i messed. Thanks for your help. Now it works fine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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