Error with VB2010

I thought VB (particularly in later versions) let you do things like that.