Can't Create a New Project

I just recently downloaded Unreal Engine 4.16.3 and Visual Studio Community 2017. When I try to create a new project it says that “The project could not be complied. Would you like to open it in Visual Studio?” When I click yes it says that it “Could not edit the code editing IDE.” HELP

When you installed VS2017 did you also install the extension ‘Game Development for games with C++’?
If not then go to your Visual Studio Installer, next to Visual Studio 2017 click modify and then check the box for Game Development with C++.

If you already have the above you could try resetting the project by deleting the Binaries, Build, Intermediate and Saved folders and then try generating the Visual Studio Project Files and opening the project again.