That's depends on exactly what you're talking about.
No, VB.NET and the .NET Framework do not have anything built in to do this. YOU have to write the code to do it.
Now, in precise terms, what do you mean by "encrypt a file with a password"? Sure you can do that. Just pick an encryption algorithm and write an app that can accept a password and a source file, do the encryption using the password as a key or and/or salt and output an encrypted file.
Obviously, the app would also need to do the reverse.
Now, what exactly are you doing with the encrypted file and what do you hope to prevent?
Theoretically you could simply attempt to open it with all file-format-reading-"procedures" you have available and see if any of them work.
But I would suggest to simply not bother. Other applications also just tell you something like "invalid file format". You can't take care of every eventuality. There's probably other stuff related to your application where investing your time instead would pay off more.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson