Consulting

Results 1 to 3 of 3

Thread: Copy function from workbook to another in VBA

  1. #1

    Copy function from workbook to another in VBA

    Hi,

    Running a macro (several different routines) off one work book on another.

    Workbook called 'NEWSWMacro' runs the routines on the other workbook called 'EFM'.

    The content (data) of EFM changes each day which is why the macros run from the other workbook.

    What I need to do is add a module to NEWSWMacro with a particular function and then copy that module/function
    over to EFM workbook at the end of the main code. Is it possible?

    Can anyone help with this please

    thanks
    Jon

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    613
    Location
    .
    http://www.cpearson.com/Excel/VBE.aspx

    Copy A Module From One Project To Another

  3. #3
    This is very complex - can I just check which elements I need to replace

    Source project = NEWSWMacro Do I replace FromVBProject with this adding "" to string?
    To project = EFM Do I replace ToVBProject with this adding "" to string?
    ModuleName = SumByColor replace

    Any other changes I need to make

    thanks
    Jon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •