If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Dynamic Object Creation... Possible?

I'm trying to determine if it is possible to dynamically set an object. In
other words, if I have a variable name (say MyCalx), is it possible to pass
that to a subroutine and do a Set MyCalx as New Calendar. It seems to work
when I do this, but cannot access any of the properties or functions using
MyCalx. If I try something like MyCalx.getdate() it comes back with "object
required".

Re: Dynamic Object Creation... Possible?

Use Set MyCalx = Server.CreateObject("<ProgID>") instead of
Set MyCalx as New Calendar. You need the ProgID for the Calendar object.

"Jordan" <jordys@mediaone.net> wrote in message
news:3bc364fe$1@news.devx.com...
>
> I'm trying to determine if it is possible to dynamically set an object.
In
> other words, if I have a variable name (say MyCalx), is it possible to
pass
> that to a subroutine and do a Set MyCalx as New Calendar. It seems to
work
> when I do this, but cannot access any of the properties or functions using
> MyCalx. If I try something like MyCalx.getdate() it comes back with
"object
> required".
>
> Any help on this would be greatly appreciated.
>
> Jordy