Can a function return a dictionary object?

Answer Posted / parag barjatiya

Public Sub GetValue()
Set obj = getname
MsgBox (obj.Item("name"))
End Sub

Public Function getname()
Dim dicObj
Set dicObj = CreateObject("Scripting.Dictionary")
dicObj.Add "name", "Uday Kumar"
Set getname = dicObj
End Function

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)

1556


suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

1494


Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..

4148


How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?

706


Explain how to use QTP to check broken links on a page?

589






What are the different ways to invoke an application using QTP?

650


How you create new action in qtp?

570


How to remove the associated function library?

532


Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?

1231


What is parameter in qtp?

682


descriptive program for a yahoo mail that is in yahoo mail suppose check box mailid subject assume it is like this format all things are in webtable the question is suppose some mail ids are there in that mailids i want to select the check box wich is before a@gmail.com and after that i want to click on delete button

1812


Diff b/w Health care domain and Banking Domain?

4220


When you open QTP, how many sheets you can see?

664


hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)

1406


I want to write some certification courses, so friends could you guide me? which certification is best and how to write exam and what tutorials need to be studied,what to do first, I am working on automation tool QTP 9.2

1500