I don't think there is a tool to convert whole programs, but if you know both languages you can do it by hand. Note that the changes you have to make might be more than just syntactical.
If you want VB code, you probably should be posting on a VB site.
Your syntax in the second snippet is fine, except for the following:
line 1: if should not be capitalized. C++ is case sensitive.
lines 3,7: statement(s) must be terminated with a ;
If I understand your question correctly, you are looking for an automated way to convert VB to C++. To do that, you really need to write a parser capable of parsing the VB language and then generate the corresponding C++ syntax. That's not a trivial undertaking.