I want to put my subroutines in an external file. When I press the help button it pops up errors. Even at startup it shows errors. If I put the contents of scripts.vbs
within the HTA they work fine.
Here is the code:
Contents of scripts.vbs
file:
Sub Window_Onload
Msgbox "welcome"
end sub
Sub Help
MsgBox "This is an example of progressbar in HTA written by Fredledingue.",,MyTitle
End Sub
Contents of HTA file:
<script type="text/vbscript" src="scripts.vbs">
</script>
<body bgcolor="GreenYellow">
<input id="BtnHelp" type="button" value="Help" onclick="Help">