VBA - If range value = "date" then

Wasn't February spelt incorrectly before?
 
I'm thinking that I need to define the variable (if that's the right term).

In simple speak as you defined the intyear as the Date I need to define each IntMonth 1 -12 as something like:

intMonth 1 = ("January")
 
No, it does it for you. The first sheet you supplied did not have the sheet February spelt correctly, so it will not find the sheet for that month.

Computers are stupid. You have to tell them exactly what they need to do. You and I would recognise the error and know it should be February, but code does not unless you cater for it.
 
Wasn't February spelt incorrectly before?

Im a god damn retard :o Ive just corrected it and it seems to work now in the primary version :(

Seems like spelling is important when it comes down to this sort of thing. This is just like me accidentally putting a space in after July :banghead:
 
Seems like spelling is important when it comes down to this sort of thing. This is just like me accidentally putting a space in after July :banghead:

You might get by with that, you can only try and see, but it is a good habit to get into.
Silly errors like that can be hard to find.
 
Right I think its home time again.

Thanks again for all the help. Now that this is good and sorted maybe I can get some sleep without thinking about VBA and getting this thing working for one night.

If I can ever give you a hand with anything (somehow) just let me know.

I hope one day to be as skilled as you sir, and I bid you good day :D
 
Now see, I am that sad, that I would go home and try and think of a way to solve the problem. Even email myself the workbook to test at home. :D

Have a good evening.:)
 

Users who are viewing this thread

Back
Top Bottom