SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Loops That Increment Alphabetically?

    User (David_Goldstein@cch-lis.com.nospam) posted:
    I'm writing a sript that reads from a CSV file (using the Excel libraries). I
    have a loop that I want to create that will look at each column one at a time
    starting with A1, then B1, then C1, etc. Is there a way to create a loop that
    can increment from A to B to C etc. instead of from 1 to 2 to 3 etc.?

    Thanks,
    Dave
    ---

  2. #2
    Member
    Join Date
    Oct 2001
    Location
    Staten Island
    Posts
    56
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Loops That Increment Alphabetically?

    try using the chr function.
    A = chr(65)
    Z = chr(90)

    loop from 65 to 90 (or the upper limit)
    set a string to the chr value
    and append that to the number.
    ex. chr(66) & 5 = B5


    ------------------

  3. #3
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Loops That Increment Alphabetically?

    User (Paul_Downes@providian.com.nospam) posted:


    The following demonstrates the principle to apply:

    Dim iChar as Integer
    Dim sCharString as STring

    For iChar = 65 to 90
    sCharString = sCharString & Str(Chr(iChar))
    Next iChar

    MsgBox "Text = " & sCharString

    Cheers . . . Paul
    David_Goldstein@cch-lis.com on 11/12/2001 02:09:04 PM

    Please respond to "SQA Suite Team Test Users"
    <sqa-suite-users@lyris.dundee.net>

    To: "SQA Suite Team Test Users" <sqa-suite-users@lyris.dundee.net>
    cc:

    Subject: Loops That Increment Alphabetically?

    I'm writing a sript that reads from a CSV file (using the Excel libraries).
    I
    have a loop that I want to create that will look at each column one at a
    time
    starting with A1, then B1, then C1, etc. Is there a way to create a loop
    that
    can increment from A to B to C etc. instead of from 1 to 2 to 3 etc.?

    Thanks,
    Dave
    ---

  4. #4
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Loops That Increment Alphabetically?

    User Schoen, Torsten 3865 PPE-QA1 (Torsten.Schoen@de.heidelberg.com.nospam) posted:

    What I have done to iterate through excel columns/rows is to define a
    starting cell as a range object and use relative addressing. As far as I
    recall it works something similar like this:

    oStart = oSheet.Range("A1")

    For i = 1 to 10
    oStart.Cells(1,i)
    Next i

    That should iterate from A1 to K1, or maybe from A1 to A10, but you can look
    that up in the Excelreference

    Hope that helps

    Torsten Schoen
    PPE-QA1
    Heidelberger Druckmaschinen AG
    ---

  5. #5
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Loops That Increment Alphabetically?

    User Rino Van Dam (RVanDam@psakids.com.nospam) posted:

    Oops, typo!

    should have read:

    SQAGetProperty (".\;Type=Window;Caption=Patient not complete","Caption",
    varDialogCaption ) etc.

    Rino

    ---

  6. #6
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Loops That Increment Alphabetically?

    User Gustavo Rojas (grojas@microsoft.com.nospam) posted:

    Have you SetContext to the window before doing the SQAGetProperty, with
    a click at least?

    Gustavo Rojas
    ____________________________________
    Microsoft Great Plains Business Solutions
    Quality Assurance Analyst
    Solomon Platform Services Group



  7. #7
    SQA Council
    Join Date
    Mar 2001
    Posts
    14,438
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Loops That Increment Alphabetically?

    User Elena Pevzner (elenapevzner@yahoo.com.nospam) posted:

    You shouldn't use ".\;" in your rec method.

    Elena

    --- Rino Van Dam <RVanDam@psakids.com> wrote:
    leave-sqa-suite-users-9233366V@lyris.dundee.net


    __________________________________________________

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:51 PM.

Copyright BetaSoft Inc.