+ Reply to Thread
Results 1 to 12 of 12

Message box pop up asking if I want to run a macro which pulls data from another SS

  1. #1
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    120

    Message box pop up asking if I want to run a macro which pulls data from another SS

    Hello All,
    I would first like to tell everybody how much I appreciate this forum. I have gotten the best help and I have learned so much by looking at other post. The experts on this site are the best!!!

    My question or plead for help is... I have a master spreadsheet (sheet1) that I have a popup box that asks if I want to run the macro. The macro is deleting all from example 1 then goes to example2 and copies data and paste the data on example1. I am getting an error when it gets to this code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Just to try:

    Please Login or Register  to view this content.
    Last edited by Sbarro79; 02-10-2015 at 03:00 PM. Reason: code change

  3. #3
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    120

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Hello Sbarro79. Thank you for the help. I tried the macro and I am getting the error workbook example2.xlsx not found.
    Not found.JPG

    I have attached a print screen of the example2 is open in the background and the error

  4. #4
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Can you check, if the path to example2.xlsx is correct (no misspelling etc.)?

  5. #5
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    120

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Hello Sbarro79, It looks like the spelling is correct. I did the print screen with the example2.xlsx is open in the background showing the spelling looked correct.

  6. #6
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Maybe another way: what did you write in this line:

    Please Login or Register  to view this content.
    between quotation marks? (It should be something like C:\Users\Tammy\Somefolder\example2.xlsx)
    In other words I'm asking about example2.xlsx location.
    And please notice that I've changed code a little.
    Last edited by Sbarro79; 02-10-2015 at 03:01 PM.

  7. #7
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    120

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Hello Sbarro79, thanks for coming back to help me. I understand now what you are saying but there is a glitch with naming the path to a persons folder. The spreadsheet (sheet2) is an export from a report that is out on the company's intranet and sheet1 will be shared by several people so the patch is on the desktop of whom every exports sheet2.

    Example of how the sheets should work:
    Person exports sheet 2 from the intranet
    Then person opens sheet1 and the macro pops up to adds the data from sheet2 to sheet1

    I really appreciate you helping me with this.

  8. #8
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Because of my english is quite rubbish, sometimes I don't understand what people are trying to say to me, so could you correct if I'm wrong:
    I understand, that every person is downloading sheet2 file from intranet onto local disc on the PC, but how exactly sheet1 file is shared - every person uses its own copy of this file, or you all use the same file located on company's server?

  9. #9
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    120

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Hello Sbarro,
    Sheet 1 is located on a company shared drive.
    Sheet 2 will be export onto the person desktop.
    so both sheets will be located on the person desktop when they are opened. Or more like both sheets will be active on the person computer.

  10. #10
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Hi Tammy

    I have no experience with shared files (sorry..), but I'll still try to help you somehow.
    For now try this:

    Please Login or Register  to view this content.
    It forces user to choose the exported (shouldn't be imported?) file manually in order to resolve a path glitch you wrote about (or at least I hope it will )
    Please be advised that this code may generate an error (error number 52 I think) if you try to use it at the same time when another person be using it (but I'm not sure of that)

  11. #11
    Forum Contributor
    Join Date
    05-08-2013
    Location
    FLORENCE, ALABAMA
    MS-Off Ver
    Excel 2010
    Posts
    120

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Hello Sbarro79,
    I have tried the code you gave me. It is wanting me to choose a file on my computer. It had the box "Choose your file" pop up. We won't have example2 saved anywhere because it is just a temporary active file that we just want to pull the data from. We just want to export data from the website and it will open with the name example2 from the website then I will open sheet1 and export the data from the active example2 (open in the background) then pull the data on my main spreadsheet example1.

    Thank you so much for helping me with this.

  12. #12
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: Message box pop up asking if I want to run a macro which pulls data from another SS

    Hi
    Sorry for the very late reply.

    Because I have no experience with intranet then I couldn't realize that this exported file is a temporary file.
    So try this simple code:

    Please Login or Register  to view this content.
    Because I have no way to test it (no access to intranet), there is no guarantee it will work at all

+ 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. Macro that pulls data from one spreadsheet to another
    By EOrlovskis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-07-2012, 02:03 AM
  2. Excel macro to pulls data from another sheet and replaces it
    By Maxwee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2012, 04:41 PM
  3. Need Macro that pulls Data from one sheet and pastes into other specific sheets
    By cmcgowan1524 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2012, 10:58 AM
  4. Macro that pulls data like vlookup but for multiple instances
    By finance14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2011, 10:53 PM
  5. Writing a macro that pulls data from a specific worksheet
    By fecurtis in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-14-2008, 05:21 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