I'm confused.
Your subject says "VBScript..." and you use VB syntax in the code sample.
If your code runs inside an HTML page, you need to use the methods of the DOM (document object model). In order to set the focus to a control, call controlname.focus(). SetFocus is for VB only.