Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Script not saving the result

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Script not saving the result
  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 >>
 Script not saving the result - 5/2/2008 4:26:40 AM   
  shahid09

 

Posts: 36
Score: 0
Joined: 1/22/2007
Status: offline
 
Hi All,

I am trying to save values in excel sheet. When i debug my code.Ii can see values in excel sheet but when i check through my local drive data in not being populated.
Here is my code


      

Thanks

_____________________________

shahid
 
 
Post #: 1
 
 RE: Script not saving the result - 5/2/2008 4:46:15 AM   
  ehvbs

 

Posts: 2012
Score: 48
Joined: 6/22/2005
From: Germany
Status: offline
Hi shahid09,

your

   objExcel.ActiveWorkBook.Close SaveChanges = True

looks a bit like a VBA method call with named arguments:

   objExcel.ActiveWorkBook.Close SaveChanges := True

that should be transalted to VBScript positional arguments (assuming
the SaveChanges parameter is the first one):

   objExcel.ActiveWorkBook.Close True

But your expression evaluates to False (assuming you don't init the
variable SaveChanges to a true value). So you get what a programmer
not using "Option explicit" deserves: a hidden bug.

Regards

ehvbs

(in reply to shahid09)
 
 
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 >> Script not saving the result 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