Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


How to assign values to run time variables!!!

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,50162
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to assign values to run time variables!!!
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 How to assign values to run time variables!!! - 7/31/2007 12:57:26 AM   
  vijaye82

 

Posts: 11
Score: 0
Joined: 4/24/2007
Status: offline
Hi to All,

I am writing a script that need to values at run time and update in a .csv file. I am not sure how do i assign values to variables at run time.

*********************************
Below is my code:

For i = 1 to 10

     var & i = "Some value"

Next
*********************************

When i run this code, i get Syntax error in the second line near '&'..

Is there any way to do this..

Kindly help me on this.

Thanks,
Vijay
 
 
Post #: 1
 
 RE: How to assign values to run time variables!!! - 7/31/2007 1:18:24 AM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline
That won't work for a couple of reasons.

1) var &i = "Some Value" is invalid

2) You can't have i equal to a string when you've already made it the variable for your FOR NEXT loop

< Message edited by ginolard -- 7/31/2007 1:21:17 AM >


_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to vijaye82)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> How to assign values to run time variables!!! Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts