OK, I see what you're trying to do, but I don't agree. You are creating a lot of unecessary work for yourself. Why not just make an Active X control, which can be embedded into HTML, without any hassle? That is the route I'd take.