|  |  developerWorks > Rational >
Excel macro for converting a company's phone list to an IBM Rational ClearQuest importable user file |  |
|
 | Level: Introductory IBM Rational (dwinfo@us.ibm.com), Staff, IBM
21 Apr 2004 This is an example of an external hook for customizing IBM® Rational® ClearQuest®.
This item was originally published in May 2002.
NOTE: This hook is presented only as an example of how to customize your use of IBM Rational ClearQuest. It has not been formally tested, and is not supported by IBM.
Description
Examine the input formats on sheets 1 and 2 of this Excel file. Run the macro enclosed in the file (make sure you enable macros when you load this file) to bring up the converter.
Script Language
VB Script
Code
Sub CQUserImporter()
nUsedColumns = ActiveSheet.UsedRange.Columns.Count
With UserImporterForm
' clear all the checkboxes and combo boxes
.ComboBoxEmail.Clear
.ComboBoxMisc.Clear
.ComboBoxName.Clear
.ComboBoxPhone.Clear
.CheckBoxPassword = True
.TextBoxPassword.Enabled = False
.CheckBoxAppend = False
.CheckBox2 = False
.CheckBox3 = False
.CheckBox4 = False
.CheckBox5 = False
.CheckBox6 = False
.CheckBox7 = False
.CheckBox8 = False
.CheckBox9 = False
.CheckBox10 = False
.CheckBox11 = False
' add header columns to all combo boxes
Dim headerArray() As String
ReDim headerArray(nUsedColumns)
For Column = 1 To nUsedColumns
NextString = Cells(1, Column).Value
headerArray(Column) = NextString
.ComboBoxEmail.AddItem (NextString)
.ComboBoxMisc.AddItem (NextString)
.ComboBoxName.AddItem (NextString)
.ComboBoxPhone.AddItem (NextString)
Next Column
On Error Resume Next
Set cqObj = CreateObject("CLEARQUEST.SESSION")
databases = cqObj.GetAccessibleDatabases("MASTR", "", "")
For Each Db In databases
.ListBox1.AddItem (Db.GetDatabaseName)
Next
.Show
End With
End Sub
|
Submitter: Jason Slater
About the author  | |  | This content is developed by IBM Rational |
Rate this page
|  |
|