Object from variable

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • news.microsoft.com

    #1

    Object from variable

    Hi,

    I am sorry if it has been discuss before I searched and could not find.

    I want to create object from variable. I have name of Crystal Report in
    Table and I want to create object from variable
    any idea or clue

    Thanks

    Sohail


  • Cor Ligthert [MVP]

    #2
    Re: Object from variable

    Hi,

    Strange question in my eyes, however

    Dim a as new object
    a = "Whatever you want and whatever value you want"

    I don't know if this is what you were after,

    Cor

    "news.microsoft .com" <shkhan@peo.on. ca> schreef in bericht
    news:OGT5ms0fGH A.4892@TK2MSFTN GP02.phx.gbl...[color=blue]
    > Hi,
    >
    > I am sorry if it has been discuss before I searched and could not find.
    >
    > I want to create object from variable. I have name of Crystal Report in
    > Table and I want to create object from variable
    > any idea or clue
    >
    > Thanks
    >
    > Sohail
    >
    >[/color]


    Comment

    • news.microsoft.com

      #3
      Re: Object from variable

      Thanks for your reply, I think i was not clear in my problem.

      normally it is
      dim rpt as rptBudget = new rptBudget

      rpt Budget is a Crystal Report

      I want to do somehting like this
      xyz = "rptBudget"
      how can i create object of xyz





      "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> wrote in message
      news:#JxMs30fGH A.1272@TK2MSFTN GP03.phx.gbl...[color=blue]
      > Hi,
      >
      > Strange question in my eyes, however
      >
      > Dim a as new object
      > a = "Whatever you want and whatever value you want"
      >
      > I don't know if this is what you were after,
      >
      > Cor
      >
      > "news.microsoft .com" <shkhan@peo.on. ca> schreef in bericht
      > news:OGT5ms0fGH A.4892@TK2MSFTN GP02.phx.gbl...[color=green]
      > > Hi,
      > >
      > > I am sorry if it has been discuss before I searched and could not find.
      > >
      > > I want to create object from variable. I have name of Crystal Report in
      > > Table and I want to create object from variable
      > > any idea or clue
      > >
      > > Thanks
      > >
      > > Sohail
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Robin Mark Tucker

        #4
        Re: Object from variable


        Use Activator.Creat eInstance. For example:



        theObject =
        Activator.Creat eInstance(Type. GetTypeFromProg ID("MyNamespace .MyType"))




        "news.microsoft .com" <shkhan@peo.on. ca> wrote in message
        news:%23zc2kI1f GHA.2188@TK2MSF TNGP05.phx.gbl. ..[color=blue]
        > Thanks for your reply, I think i was not clear in my problem.
        >
        > normally it is
        > dim rpt as rptBudget = new rptBudget
        >
        > rpt Budget is a Crystal Report
        >
        > I want to do somehting like this
        > xyz = "rptBudget"
        > how can i create object of xyz
        >
        >
        >
        >
        >
        > "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> wrote in message
        > news:#JxMs30fGH A.1272@TK2MSFTN GP03.phx.gbl...[color=green]
        >> Hi,
        >>
        >> Strange question in my eyes, however
        >>
        >> Dim a as new object
        >> a = "Whatever you want and whatever value you want"
        >>
        >> I don't know if this is what you were after,
        >>
        >> Cor
        >>
        >> "news.microsoft .com" <shkhan@peo.on. ca> schreef in bericht
        >> news:OGT5ms0fGH A.4892@TK2MSFTN GP02.phx.gbl...[color=darkred]
        >> > Hi,
        >> >
        >> > I am sorry if it has been discuss before I searched and could not find.
        >> >
        >> > I want to create object from variable. I have name of Crystal Report in
        >> > Table and I want to create object from variable
        >> > any idea or clue
        >> >
        >> > Thanks
        >> >
        >> > Sohail
        >> >
        >> >[/color]
        >>
        >>[/color]
        >
        >[/color]


        Comment

        • news.microsoft.com

          #5
          Re: Object from variable

          Thanks for all of you

          I found very good example here

          Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!


          Sohail



          "Robin Mark Tucker" <robintuckerhom e@removehotmail .comremove> wrote in
          message news:e523e5$ns4 $1$8300dec7@new s.demon.co.uk.. .[color=blue]
          >
          > Use Activator.Creat eInstance. For example:
          >
          >
          >
          > theObject =
          > Activator.Creat eInstance(Type. GetTypeFromProg ID("MyNamespace .MyType"))
          >
          >
          >
          >
          > "news.microsoft .com" <shkhan@peo.on. ca> wrote in message
          > news:%23zc2kI1f GHA.2188@TK2MSF TNGP05.phx.gbl. ..[color=green]
          > > Thanks for your reply, I think i was not clear in my problem.
          > >
          > > normally it is
          > > dim rpt as rptBudget = new rptBudget
          > >
          > > rpt Budget is a Crystal Report
          > >
          > > I want to do somehting like this
          > > xyz = "rptBudget"
          > > how can i create object of xyz
          > >
          > >
          > >
          > >
          > >
          > > "Cor Ligthert [MVP]" <notmyfirstname @planet.nl> wrote in message
          > > news:#JxMs30fGH A.1272@TK2MSFTN GP03.phx.gbl...[color=darkred]
          > >> Hi,
          > >>
          > >> Strange question in my eyes, however
          > >>
          > >> Dim a as new object
          > >> a = "Whatever you want and whatever value you want"
          > >>
          > >> I don't know if this is what you were after,
          > >>
          > >> Cor
          > >>
          > >> "news.microsoft .com" <shkhan@peo.on. ca> schreef in bericht
          > >> news:OGT5ms0fGH A.4892@TK2MSFTN GP02.phx.gbl...
          > >> > Hi,
          > >> >
          > >> > I am sorry if it has been discuss before I searched and could not[/color][/color][/color]
          find.[color=blue][color=green][color=darkred]
          > >> >
          > >> > I want to create object from variable. I have name of Crystal Report[/color][/color][/color]
          in[color=blue][color=green][color=darkred]
          > >> > Table and I want to create object from variable
          > >> > any idea or clue
          > >> >
          > >> > Thanks
          > >> >
          > >> > Sohail
          > >> >
          > >> >
          > >>
          > >>[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          Working...