+ Reply to Thread
Results 1 to 5 of 5

Running workbook macro from personal workbook

  1. #1
    Registered User
    Join Date
    06-18-2007
    MS-Off Ver
    2007
    Posts
    77

    Running workbook macro from personal workbook

    I have several workbooks all containing the macro "Update". As part of other code stored in my personal workbook, I want to run the "update" macro. How can I execute "Update" from the personal folder, on several files with different file names? Each workbook, one at a time, will be individually opened when the code is executed. Thanks.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Running workbook macro from personal workbook

    You need to post the code.

    basically you will need to make sure the code runs with ActiveWorkbook otherwise it will try to run with the personal workbook
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Running workbook macro from personal workbook

    From what you have written, the code is already in the Personal Macro Workbook.

    Press Alt & F8, select the macro to run.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Running workbook macro from personal workbook

    Do you mean that you want to automate the opening of each file, run the code, save & close. Be more specific with the question

  5. #5
    Registered User
    Join Date
    06-18-2007
    MS-Off Ver
    2007
    Posts
    77

    Re: Running workbook macro from personal workbook

    Below is the code (CyRegCasesConvert2010) that is stored within my personal workbook. I want to open several files, manually and one at a time, make some manual adjustments and then run CyRegCasesConvert2010 on the open workbook. At the end of the CyRegCasesConvert2010 procedure, I want to start another Sub, named "Update". The update sub is stored within whatever workbook is open, and is slighlty different for each file so I cant just add that code to the end of CyRegCasesConvert2010.

    I would add a line like
    Please Login or Register  to view this content.
    but the file name is obviously different for each time.

    Please Login or Register  to view this content.

+ 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