Welcome

CSS 341 -  Fundamentals of Programming Theory and Applications

Examples mostly from Kelvin Sung

 

CSS341        Computing and Software Systems        UW Bothell   

Here are the links to in-class demos.

Lecture Week/Date

What

For Download

 Week 3

Setting initial folder: We are going to open another connection, the operating environment of the script so that we can identify the initial working folder.

SetInitialFolder.vbs

 

CommonDialog ActiveX Service: Find an Excel file and then open it with excel.

OpenExcelWithCommon.vbs

 

Excel opening excel document: creating a MS-Office file open dialog  after opening excel… we will see this file open dialog in WORD, PPT, etc..

 

Here is how I find out msoFileDialogOpen constant value.

OpenExceFromExcel.vbs

Sample Spreadsheet Files to be used as target files for applications Scores.xls, ScoresX.xlsx, ScoreTest.xls, ScoreTest.xlsx, EmptyExcel.xls

 

Using Excel macro code in a VB Script.  This code is similar to that developed by the example in class notes.

UsingMacroCode.vbs

 

Loop: counting, examining, searching, control variable, assign “true” to exit the loop!  The control condition (While) is on the DO statement in this example. How do you determine is a number is even?

Loop.vbs

 

Looping with Excel: Fills specified columns with the row numbers.  Note that the control condition here (Until) is on the LOOP statement.

LoopOverExcelCells.vbs

  Looping using For Each: Obtain a collection object with files in directory and then loop over all of them, listing names in two formats. LoopOverCollection.vbs
  ExampleSubAndFunc.  Gives examples of use of function and subprogram calls ExampleSubAndFunc.vbs

 


UWB Home
18115 Campus Way NE
Bothell, WA 98011-8246
(425) 352-5000
(425) 352-5303 (TDD)

*

University of Washington, Bothell
Copyright ©2000, UWB. All rights reserved.
 
Information about UWB: uwbothel@u.washington.edu