DannyTekTipUser
Technical User
thread329-1692441
Hi,
i am a newbie with vbscript and would apppreciate if you can help me. I have a
for loop below and i am having problem on how the loop will exit whenever the
inputbox is blank or the loop will exit if Cancel is click..below is my for loop
vbscript....Thanks in Advance.
Dim fso, tf
'Dim Msg As Variant
Dim loopIndex
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("c:\Test\pcname.txt", True)
For loopIndex = 0 To 5
Msg = InputBox("Input PC Name in FQDN Format (e.g. PC1.domain.com) Then click
OK button to proceed Or Click Cancel to Terminate.", "Input Window")
tf.WriteLine(Msg)
Next
tf.Close
Hi,
i am a newbie with vbscript and would apppreciate if you can help me. I have a
for loop below and i am having problem on how the loop will exit whenever the
inputbox is blank or the loop will exit if Cancel is click..below is my for loop
vbscript....Thanks in Advance.
Dim fso, tf
'Dim Msg As Variant
Dim loopIndex
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.CreateTextFile("c:\Test\pcname.txt", True)
For loopIndex = 0 To 5
Msg = InputBox("Input PC Name in FQDN Format (e.g. PC1.domain.com) Then click
OK button to proceed Or Click Cancel to Terminate.", "Input Window")
tf.WriteLine(Msg)
Next
tf.Close