• Thanks!

     

    I modified it to use the existing owner name that I need changed to avoid an Invalid object name error.

     

           if @strOwner = 'existingname'

           begin

                  select @strExecLine = 'sp_changeobjectowner 'existingname.'' + @strName + ''',''dbo'''