Hi Brian,
It is unclear if you wish the code to run when it is opened in FP or when it
is opened in a Browsers.
The first can be accomplished by using FP VBA Macro and hooking page open
event or a number of other events such as
onpagenew, onpageclose, onpage, onpageactiviate, onwebclose....... and
more.
When runing VB code in a web page it is no VBA but VBS, VBA was specificialy
designed to work in applications. To run VBS when a page opens and is fully
rendered you'd use something like:
<script for="body" event="onload" language="vbscript">
window.location = "newpage.htm"
end sub