Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Create A Drop Down List In Vbscript - Thread329-940089

Status
Not open for further replies.

Colyn

Technical User
Aug 13, 2018
1
0
0
GB
Reference thread329-940089
I know the posting was a long time ago but I would be grateful if anyone could help me out here with a query arising from mapman04's HTA contribution. I wish to use the HTA but am stuck due to inexperience. I am also aware that Vbscript has now been retired but I need to use it anyway. My problem is that having made the selection from the drop down menu eg Ohio I then need to use the variable in which it was held ie strProduct in the rest of my script eg If strProduct = "Ohio" then ..... However, since the value "Ohio" was assigned to the variable within a subroutine it is not available for manipulation outside the routine as it has no value. Therefore, I am at a loss as to how I can obtain the earlier value of "Ohio".
Thank you
 
Vbscript has not been retired,although its use has been deprecated in IE.

And you've answered your own question … "since the value "Ohio" was assigned to the variable within a subroutine" - declare it outside all functions and subs, that'll make it a global
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top