SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    how to retrieve the value of string variable

    hi
    in vbscript for QTP i need a solution for this

    str="abc"
    abc=10

    str is a string, with its value there is a variable assigned to 10.
    i want to retrieve the value of 10 using variable str

    how can i do that

    regards,
    Anand

  2. #2
    Member
    Join Date
    Dec 2010
    Posts
    90
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to retrieve the value of string variable

    Sorry not sure I follow. Is this what you are trying to do?

    abc=10
    str=abc

    msgbox str --> the value will be 10

  3. #3
    Junior Member
    Join Date
    Sep 2011
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to retrieve the value of string variable

    try this one,

    abc = 10
    Execute "str ="&"abc"

  4. #4
    Junior Member
    Join Date
    Sep 2011
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to retrieve the value of string variable

    abc = 10
    Execute "str = abc"
    MSgBox str

  5. #5
    Super Member
    Join Date
    Dec 2005
    Location
    USA
    Posts
    1,407
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Total Downloaded
    0

    Re: how to retrieve the value of string variable

    str="abc"
    abc=10
    str=Cstr(abc)
    msgbox str
    ------------
    Chikki
    when things gets harder ,the harder gets going

  6. #6
    Junior Member
    Join Date
    May 2011
    Posts
    20
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to retrieve the value of string variable

    hi Kashi_Vishwanath
    thank u so much
    both the methods worked

    thank u chikki
    but i need the result as an integer

    -Anand

  7. #7
    Junior Member
    Join Date
    Sep 2011
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: how to retrieve the value of string variable

    you're welcome.

 

 

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 10.00%
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 04:09 PM.

Copyright BetaSoft Inc.