Consulting

Results 1 to 3 of 3

Thread: How to access separate module macro from different project

  1. #1

    Exclamation How to access separate module macro from different project

    Hello ,

    I'm not sure if I'm even doing this correctly but it seems like it should be extremely simple. Anyway, I currently have an excel spreadsheet embedded into a PowerPoint, VBAProject(Worksheet in MWP - Current.pptm) There is a macro in Module1 of this excel which deletes an entire row. This macro is working properly as I've tested it. It's in

    'Deletes 1 row from embedded excel sheet in PowerPoint.
    Sub SolarLunarUpdate()
    Rows("2:2").Select
    Selection.Delete Shift:=xlUP
    End Sub


    This PowerPoint has macro menu I can click which runs macros in the PowerPoint. A specific Macro, UpdateTitleSlide() basically just updates the title but its in a Module inside of VBAProject( MWP - Current.pptm).

    'This is much shorter than what it actually does, but for understanding of what I have
    Sub UpdateTitleSlide()
    'some stuff here (not important)
    Call SolarLunarUpdate
    End Sub

    What I would like to do is click the run UpdateTitleSlide Macro. And from inside of that Macro it calls the SolarLunarUpdate() macro, which will access the embedded excel spreadsheet and delete a row.

    Thanks... I hope I explained that well

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,812
    Location
    It's been a long time, so, I'm probable wrong, but...

    I believe that you will need to access the desired macro thru a sub in ThisWorkbook.

    Dim X As new Excel blahblah
    X.SubToRunDesiredMacro

    X + Dot + Name of Macro in ThisWorkbook
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    I'm not exactly sure what you mean? Sorry.

Tags for this Thread

Posting Permissions

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