Is it just this one sub that's not working? Check the project's references for missing type libraries (Tools>References).