vbscript

Excel - Macro to conditionally copy rows to another worksheet

Does anyone have a macro or could point me to a way that I could conditionally copy rows from one worksheet to another in Excel 2003. I'm pulling a list of data from Sharepoint via web query into a blank worksheet in Excel, and then I want to copy the rows for a particular month to a particular worksheet (e.g., all July data from Share...

If it is decided that our system needs an overhaul, what is the best way to go about it?

We are mainting a web application that is built on Classic ASP using VBScript as the primary language. We are in agreement that our backend (framework if you will) is out dated and doesn't provide us with the proper tools to move forward in a quick manner. We have pretty much embraced the current webMVC pattern that is all over the place...

CScript/WScript Prevent an error from being blocking

Currently, WScript pops up message box when there is a script error. These scripts are called by other processes, and are ran on a server, so there is nobody to dismiss the error box. What I'd like is for the error message to be dumped to STDOUT, and execution to return the calling process. Popping as a MSGBox just hangs the entire thi...

Microsoft Event Calendar into webpage via vbscript

Hello all I have been asked to recreate a Micorsoft Events Calendar using the data within it (stores when people are off etc), onto a webpage using vbscript. It needs to only select the current day and display as a list. Does anyone know any ways? I am new to vbscript so any code examples would be great. Thanks for your help Cl...

Executing a script file from a Windows Installer Custom Action

I need to execute a batch file as part of the un-install process in a Windows installer project (standard OOTB VS 2008 installer project-vdproj). One cannot execute a bat file directly from the Custom Actions in the installer project, so I wrote a quick vbs script to call the required bat file. vbs code: Set WshShell = WScript.CreateO...

Problem calling stored procedure from another stored procedure via classic ASP

We have a classic ASP application that simply works and we have been loathe to modify the code lest we invoke the wrath of some long-dead Greek gods. We recently had the requirement to add a feature to an application. The feature implementation is really just a database operation requires minimal change to the UI. I changed the UI and...

Exception handling.

Hi All, I am Anil. Can you please clarify the folowing query? I am not sure if the way I am trying to code is correct. Kindly advise me if I am moving in the right/wrong direction. I am trying to develop an automation framework using QuickTest Professional, a testing tool. There is an Excel sheet from which the data is being taken fo...

Use clipboard from VBScript

I am looking for a method to place some text onto the clipboard with VBScript. The VBScript in question will be deployed as part of our login script. I would like to avoid using anything that isn't available on a clean Windows XP system. Edit: In answer to the questions about what this is for. We wanted to encourage users inside our ...

Check for a valid guid

How can you check if a string is a valid GUID in vbscript? Has anyone written an IsGuid method? ...

VBScript: Using a variable within a DOM element

Hello all, I'm looking to use a VBScript variable within a reference to a DOM element for a web-app I'm building. Here's a brief exerpt of the affected area of code: dim num num = CInt(document.myform.i.value) dim x x = 0 dim orders(num) For x = 0 To num orders(x) = document.getElementById("order" & x).value objFile.writeLine(o...

Type double byte character into vbscript file

I need to convert (&rarr) to a symbol I can type into a ANSI VBScript file. I am writing a script that translates a select set of htmlcodes to their actual double byte symbols using a regex. Many languages accomplish this using "\0x8594;"... what is the equivelent in VBScript? ...

VBScript: How to utiliize a dictionary object returned from a function?

I'm trying to return a dictionary from a function. I believe the function is working correctly, but I'm not sure how to utilize the returned dictionary. Here is the relevant part of my function: Function GetSomeStuff() ' ' Get a recordset... ' Dim stuff Set stuff = CreateObject("Scripting.Dictionary") rs.MoveFirst Do Unt...

Xsl relative path for xsl:import or xsl:include

I am trying to use VBSctipt to do an xslt transform on an xml object. The xsl file I'm translating includes the <xsl:import href="script.xsl"/> directive. If I use the absolute href (http://localhost/mysite/script.xsl) it imports the style sheet fine; however, if I use the relative path (script.xsl) it reports "resource not found". I ne...

VBScript Excel Formatting .xlsx files

Basically I want to know how to set center alignment for a cell using VBScript... I've been googling it and can't seem to find anything that helps. ...

Refactoring "include file hell"

One thing that's really been making life difficult in getting up to speed on the codebase on an ASP classic project is that the include file situation is kind of a mess. I sometimes find the function I was looking for being included in an include file that is totally unrelated. Does anyone have any advice on how to refactor this such t...

Any experience with compiling VBScript?

I have a home-spun 2000 lines VBScript script, that has become progressively slow with each additional code I add. It was created as a private debugging aid and now that it has become really useful. I want to polish it and ship it along with our product. I thought I could speed it up by compiling it and making it an EXE. Furthermore I w...

How to determine when copy finishes in VBScript?

Does anyone know of a method to determine when a file copy completes in VBScript? I'm using the following to copy: set sa = CreateObject("Shell.Application") set zip = sa.NameSpace(saveFile) set Fol = sa.NameSpace(folderToZip) zip.copyHere (Fol.items) ...

Response.Write vs <%= %>

Bearing in mind this is for classic asp Which is better, all HTML contained within Response.Write Statements or inserting variables into HTML via <%= %>. Eg Response.Write "<table>" & vbCrlf Response.Write "<tr>" &vbCrLf Response.Write "<td class=""someClass"">" & someVariable & "</td>" & vbCrLf Response.Write "</tr>" & vbCrLf Respon...

"Class does not support automation" error when i call Request.ServerVariables("remote_host")

I'm in the process of writing a basic cookie for an ecommerce site which is going to store the user's IP among other details. We'll then record the pages they view in the database and pull out a list of recently viewed pages. However i'm having an issue with the following code. dim caller caller = Response.Cookies("caller") if caller ...

VBScript -- Using error handling

Hi all, I want to use VBScript to catch errors and log them (ie on error "log something") then resume the next line of the script. For example, On Error Resume Next 'Do Step 1 'Do Step 2 'Do Step 3 When an error occurs on step 1, I want it to log that error (or perform other custom functions with it) then resume at step 2. Is this ...