SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Florida, United States
    Posts
    2,744
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Blog Entries
    1

    AOM Excel Question

    I posted this question on the mrexcel.com site about 5 days ago and did not get an answer. I don't usually like posting the same question on multiple sites but i'm stuck and I know I'm doing something wrong because I got this to work about 2 years ago and don't remember how.

    I have an Excel User Form with code similar to this. This code is behind a button to start running the UFT script. The other buttons on the User Form do not respond to input from the user when the
    ObjQTPTest.Run
    line of code is processing.
    I want the user to be able to click on other buttons on the same User Form while the script is running.
    In the past I did something that told Excel that it can respond to other buttons while UFT is running.
    How did I do this? I don't remember but it worked.


    Code:
     
    Set ObjQTP =  CreateObject(“QuickTest.Application”)
    
    ObjQTP.Launch
    ObjQTP.Visible = “True”
    
     If Not ObjQTP.TDConnection.IsConnected Then
         ObjQTP.TDConnection.Connect “http://cdlautowfnalm/qcbin/”,”I_HUB”,”Release4_1″,”ginnev”,”vg512013″,False
     End If
     ObjQTP.Open “[ALM] Components/IHub/IHub Run/TestDD”
    
     Set ObjQTPTest = ObjQTP.Test
    
     ObjQTPTest.Run    <-- Need to wake up a button on UserForm after this step.
    
     ObjQTPTest.Close
    
     ObjQTPTest = Nothing
    ObjQTP = Nothing
    When in Florida, Don't Tampa with the code. I made this up.

  2. #2
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,607
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0
    VBScript is single threaded so I don't believe it's possible in the way you want to do that necessarily. What you may have to do is turn it into an external command line call with WshShell.run with waitOnReturn parameter set to false. Then the rest of your code can run while that runs independently in its own process.

  3. #3
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Florida, United States
    Posts
    2,744
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Blog Entries
    1
    VBScript is single threaded. I'm looking for an answer within the Excel side. It might be out of the scope of this forum but since many of us use Excel with UFT I thought someone might know.

    The code I showed above is VBA and not VBScript. It is behind an Excel Button on an Excel User form. When an OOP application is doing a task that starts by a user clicking on something can the application be made to have an interrupt to do another task?

    Thanks,

    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

  4. #4
    SQA Knight
    Join Date
    Jun 2008
    Posts
    2,607
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

  5. #5
    SQA Knight bklabel1's Avatar
    Join Date
    Sep 2012
    Location
    Florida, United States
    Posts
    2,744
    Post Thanks / Like
    Mentioned
    2 Post(s)
    Tagged
    2 Thread(s)
    Total Downloaded
    0
    Blog Entries
    1
    NoUse4aName,
    I appreciate the link. In the link I saw a reference to
    UserForm1.show vbModeless

    This might be what I was looking for.

    Thanks,

    Kevin
    When in Florida, Don't Tampa with the code. I made this up.

 

 

Tags for this Thread

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.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 01:14 AM.

Copyright BetaSoft Inc.