I don't think this can be done in VB. You will have to make a dll. good luck