Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


need help in SELECT CASE statement in VBSCRIPT

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> need help in SELECT CASE statement in VBSCRIPT
  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 >>
 need help in SELECT CASE statement in VBSCRIPT - 6/6/2006 5:27:02 PM   
  blakeph

 

Posts: 17
Score: 0
Joined: 5/28/2006
Status: offline
hi everyone!
i have a VB Script that will export a certain files from a directory, and this script will run twice a day, once in the morning and once in the afternoon, but am having trouble getting it to work, my code looks like this:

      
any help would be highly appreciated. thanks!
 
 
Post #: 1
 
 RE: need help in SELECT CASE statement in VBSCRIPT - 6/6/2006 5:53:58 PM   
  ginolard


Posts: 1051
Score: 21
Joined: 8/10/2005
Status: offline
The IF statements testing the weekday value are redundant because you are doing that via the Select Case method.  Also, it's not Select Case = weekdayValue but simply Select Case weekDayValue.  Finally, you don't need the ElseIf statements, a simple IF will do.

Here's your code with the run statements replaced with echo statements and the above problems fixed.


      

_____________________________

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 blakeph)
 
 
Post #: 2
 
 RE: need help in SELECT CASE statement in VBSCRIPT - 6/6/2006 6:53:25 PM   
  blakeph

 

Posts: 17
Score: 0
Joined: 5/28/2006
Status: offline
thank you so much ginolard, i learned lots from you.:)

(in reply to ginolard)
 
 
Post #: 3
 
 
 
  

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 >> need help in SELECT CASE statement in VBSCRIPT 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