For the sake of bringing this up to date, since Excel 2013 there is now a built-in way of encoding URLs using the worksheet function ENCODEURL
.
To use it in your VBA code you just need to call
EncodedUrl = WorksheetFunction.EncodeUrl(InputString)
Documentation