aahhhhh... I can't believe I have been doing this!

Thanks for the timely help

Actually this code was part of a project in .NET 3.5. I had tested on my home PC, which has Visual Studio 2010 (with target framework set to .NET 3.5) which had the following line of code:

dataRows.ForEach(Sub(dr) dr("Rate") = something)

When I tried to run it on office PC which has Visual Studio 2008, this caused compilation errors and I changed the "Sub" to "Function", and that's where all my miseries began! Looks like I need a few days off from work.

This is a very old project and for some reason the option strict is turned off. Turning it on causes everything to blow out. I was just adding some features to it and fixing the old lines to make it option strict compatible will be a lot of work to do.