+ Reply to Thread
Results 1 to 8 of 8

Running Macro from One Dynamic Workbook to Another

  1. #1
    Registered User
    Join Date
    04-07-2015
    Location
    Burnley, UK
    MS-Off Ver
    2013
    Posts
    19

    Running Macro from One Dynamic Workbook to Another

    Hi All,

    At the moment I am trying to transfer some data from one dynamic workbook to another. A part of this is to see if a value is in a cell on one of the workbooks (openWb) and then run a macro that is in the other book (currentWb). because neither of them have a fixed file name, I think it isn't has straight forward as usual. I have tried a whole bunch of ways round it, but non have worked. any assistance or ideas will be welcomed greatly.

    Code:

    Please Login or Register  to view this content.
    Thanks

    Dale

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Running Macro from One Dynamic Workbook to Another

    Well - you can't set a String:

    Please Login or Register  to view this content.
    But, for that bit of code why not just:

    Please Login or Register  to view this content.
    instead of all this:

    Please Login or Register  to view this content.
    *more later
    Last edited by xladept; 02-28-2016 at 12:20 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Running Macro from One Dynamic Workbook to Another

    It looks like SecondAction must fail - see if it works at all:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Running Macro from One Dynamic Workbook to Another

    Thanks for the rep! Did it Run??

  5. #5
    Registered User
    Join Date
    04-07-2015
    Location
    Burnley, UK
    MS-Off Ver
    2013
    Posts
    19

    Re: Running Macro from One Dynamic Workbook to Another

    Hi Xladept,

    Unfortunately it had an object required error. However looking into it, online suggests taking a look at a file called the dao3032.dll in the registry. But, this file is missing. Wondering whether this is the reasons for the issues, I have my company's IT dept on the case, and I'll get back to you on what happens when the file is re-installed.

    But some rep for the help non-the-less

    Rgds

    Dale

  6. #6
    Registered User
    Join Date
    04-07-2015
    Location
    Burnley, UK
    MS-Off Ver
    2013
    Posts
    19

    Re: Running Macro from One Dynamic Workbook to Another

    Hi xladept,

    Thank you greatly for your assistance. your revised version of called the other subs was far more efficient. It turned out that I had to activate the workbook with the subs in otherwise I would get a script out of range error. As far as the object required issue is concerned, I managed to get around it.

    Have another rep point.

    Thanks

    Dale

  7. #7
    Registered User
    Join Date
    04-07-2015
    Location
    Burnley, UK
    MS-Off Ver
    2013
    Posts
    19

    Re: Running Macro from One Dynamic Workbook to Another

    oops, it appears I cant give you another point yet.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Running Macro from One Dynamic Workbook to Another

    Hi Dale,

    Thanks for trying and I'm glad you got it working!

+ 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. Running A Macro With Information From the Workbook On Opening The Workbook
    By Jaynestown in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-17-2013, 03:04 PM
  2. Replies: 2
    Last Post: 06-21-2013, 08:59 PM
  3. [SOLVED] copy all sheets from one workbook to the workbook running the macro
    By synergio in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-28-2012, 06:20 AM
  4. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 AM
  5. Running workbook macro from personal workbook
    By mashley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2009, 08:44 AM
  6. Run-time 1004 when running a macro that sends a dynamic web query
    By agwright in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-14-2009, 11:54 AM
  7. macro with dynamic web query running slow
    By bauke in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2007, 11:03 AM
  8. Replies: 9
    Last Post: 07-25-2005, 08:05 AM

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