Hi,
You'll need to Dim an additional month number variable.
Also note that rarely is is necessary to use .Select. This adds a time overhead since VBA needs to first jump back to Excel and then jump back to VBA which with some code, e.g. loops can seriously slow things down. So avoid .Select and the similar .Activate wherever possible. Just work directly with the object.
Also note it's good programming practice to have some system of identifying what the variables are. For instance I generally preface String variable names with "st", Long variable names with "l", Boolean variable names with "b", ...etc. with relatively short code this may not seem a big deal but with longer code and more variables it helps when debugging code and examining the value of variables. I've not modified your variables but the Month Numebr variable for the Input box is a Long variable hence lMonthNo. Note there's a school of thought that using the Integer variable is not needed since VBA automatically converts Integers to Long 'behind the scenes', and hence you can avoid that step by always using Long variables rather than Integer.
So try
Bookmarks