Michael,
Thanks for clearing up the issue.
Ken
"Michel Walsh" wrote:
> In the first one, you specify the library you want to reach, in the second
> case, you get the ListView from the first library which exposes such an
> entity, and by 'first', that means an order, and the order is the one you
> get by opening: Tools | References... (in VBE)
>
> So, if you are lucky, of if only one library exposes a ListView entity, both
> are equivalent.
>
>
>
> The problem can be seen as in the case of Recordset:
>
>
> Dim rst AS DAO.Recordset
> and
> Dim uvw AS ADODB.Recordset
> and
> Dim xzy AS Recordset
>
>
> Is xyz be a DAO recordset, or an ADO recordset is anyone guess, and may even
> change if ever your reference order changes!
>
> So, unless you are pretty sure you won't have name collision from different
> libraries, prefix with the library name.
>
>
> Vanderghast, Access MVP
>
>
> "Ken Warthen" <(E-Mail Removed)> wrote in message
> news:CE2D88A9-AD7C-45A2-B9A8-(E-Mail Removed)...
> > What is the difference between the following two declarations? Is there
> > an
> > advantage of one over the other?
> >
> > Private lvxObj as MsComctlLib.ListView
> >
> > Private lvxObj as ListView
> >
> > Ken
>
>
>
|