Multiple similar macros​

  • I've heard of class modules that carry out similar tasks.

    Would if apply in this case, where I'm trying to open a file from various folders (around 20).

    The Sub nominates the folder and then the function is general to all.

    Or is it the case that I still have to setup multiple Subs as each have a folder to specify?


  • Use a file browser



    I don't understand what you are trying to do with your code.

  • Cheers. I think I had something similar but changed as shown to open files. I think the above is more for folders rather than files.

    I'm trying to open PDF files from Excel. The PDF files are all over the place so I'm doing it with several macros.

    It may be that I have to write a Sub for each folder.