i'm wondering if someone can help me...
I have a section of code in which i am using HTA as a GUI to define all variables and then run a number of subroutines based on the answers provided in the GUI.
I have managed to get the text based values to be input and run the "ValidateSelectionCreateFolders" subroutine. I am now wanting to use checkboxes to decide whether or not to run other subroutines, i've included a sample of my code below:
<!DOCTYPE HTML>
<html>
<head>
<title>Market Risk BAU Reporting</title>
<HTA:APPLICATION
APPLICATIONNAME="Market Risk BAU Reporting"
ID="MRiskBAUReport"
VERSION="1.0"
SINGLEINSTANCE="yes"
SCROLL="no"/>
<style type="text/css">
body {
background-color: #DCDCDC;
color: #192272;
font-family: Calibri;
font-size: 12pt;
margin: 4em 3em;
}
</style>
</head>
<script language="VBScript">
Sub ValidateSelectionCreateFolders()
'Other Code Here
End Sub
Sub ProcessGapRun()
LogFile.WriteLine(Now() & " ProcessGapRunning")
End Sub
Sub RunReportingCycle ()
ValidateSelectionCreateFolders
If ProcessGap.Checked Then
ProcessGapRun
Else
MsgBox "ProcessGap is Unchecked"
End if
End Sub
<body>
<FORM name="RunSettings">
<p>Staff ID: <input name="StaffID" type="text"></P>
<p>Current Portfolio Date: <input name="InputPortfolio" type="text"></P>
<p>Current Market Date: <input name="InputMarket" type="text"></P>
<p>Previous Portfolio Date: <input name="InputPrevPortfolio" type="text"></P>
<p>2nd Previous Portfolio Date: <input name="InputPrev2Portfolio" type="text"></P>
Which processes do you want to run?
<p>Process Gap Report <input name="ProcessGap" type="checkbox" id="ProcessGap"></P>
<p>Export Gap Report <input name="ExportGap" type="checkbox" id="ExportGap"></P>
<p>Process EuroGap Report <input name="ProcessEURGap" type="checkbox" id="ProcessEURGap"></P>
<p>Export EuroGap Report <input name="ExportEURGap" type="checkbox" id="ExportEURGap"></P>
<p>Process Basis Risk Report <input name="ProcessBasis" type="checkbox" id="ProcessBasis"></P>
<p>Export Basis Risk Report <input name="ExportBasis" type="checkbox" id="ExportBasis"></P>
<input type="button" value="Confirm Above Selection" onclick="RunReportingCycle" /></p>
</body>
</html>
If i have checked the checkbox when i press the button i want it to first run the code that works already 'ValidateSelectionCreateFolders' and then know that the checkbox is checked and so run another subroutine 'ProcessGapRun'. I would really appreciate any help as my current code just keeps falling down with the error Object required: 'ProcessGap'
I then intend to add a number of additional checkboxes that will then run other code, but i will want it to happen individually as each checkbox is dependent upon the previous being run, how could i do this?
Thanks
Adam
Aucun commentaire:
Enregistrer un commentaire