You cannot change the object type in a script.
SQL Server 2005
When you begin a new script, your initial shortcut menu selection determines what type of script Visual Database Tools will create. While using the SQL Editor, you cannot modify the object type. For example, if you select New Inline Function and change the script to a trigger or view, this error message appears when you attempt to save the script.
