• activate macro on opening project file (Project 98)

    Home » Forums » AskWoody support » Productivity software by function » Other MS apps » activate macro on opening project file (Project 98)

    Author
    Topic
    #362676

    I have a shared project file where users keep modifying the tables. I have written a macro which open a second file which has copies of out standard entry, tracking and cost tables and then copies them via the organiser to our main project, finally closing the “template2 project down.

    Two things –

    one can I stop getting the messages “do I want to copy the table” in other words the tables are just copied ; and

    two can I make all this happen when I open my project file rather than having to run the macro?

    Sorry my vb knowledge is pretty basic – I can follow instructions but cannot do anything from scratch!

    Thanks

    Viewing 0 reply threads
    Author
    Replies
    • #551346

      Since posting this I have had a bit of a play (please bear in mind I am not very VB so I hope what I have managed to achieve does not go against the laws of nature!!)

      I created several macros to achieve what I wanted to do (because I kept thinking of bits to improve things!) I copied and pasted all these bits together into one.

      On another forum I found a bit about using

      DisplayAlerts = False

      (this needed to go before the start of the instructions for copying things in the organizer in this case!!.

      Then when examining the project explorer in the VB Editor I found a reference to the project I had open (all the macros had gone into modules). When I selected this low and behold the screen suddenly gave me a Private Sub bit which included the magic word “open”. I cut and pasted everything into this and when I open the file if I select disable macros the tables remain as they were when I last closed the file and when I select enable macros the table are all updated to those in my “template” project.

      can anyone please answer two final questions

      – how to stop the screen showing me everything that is happening when the macro is running?
      – how can I delete the modules I don’t want in the project explorer (when I select any one the edit menu is empty?)

      • #551449

        how to stop the screen showing me everything that is happening when the macro is running?
        ————-
        In Excel the syntax would be:

        Application.ScreenUpdating =False 
        

        You could try that here.

        – how can I delete the modules I don’t want in the project explorer (when I select any one the edit menu is empty?)

        try Right-Clicking on the Module and choosing Remove ModuleName.

        Cheers

    Viewing 0 reply threads
    Reply To: activate macro on opening project file (Project 98)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: