Hello there!

I'm working on a macro that would allow me to run automatically one among other macros that I already created, depending on the name of a worksheet contained in the workbook.

The thing is, I usually download 2 kinds of files from a platform, which require different macros and don't have the same name: one starts with "global-mis", the other with "sherlock". Besides, the respective names have a number associated, which changes depending on how many times you retrieve the file every day (the associated number increases).

When I download one of these this files, I then move the sheet to a workbook where I keep all my macros: in this workbook, after having moved the relevant downloaded file into it, I'm working on the following code:

Dim ws As Worksheet
For Each ws In Worksheets
If ws.Name Like "global-mis" Then Call Macro1
If ws.Name Like "sherlock" Then Call Macro2

Next ws

However, it ain't working. Every time I run it nothing happens. Do you have any suggestion please?