Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Mon, 18 Feb 2008 19:34:22 -0800,    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


Long-hand references vs short-hand   
Is there any functional differences between the construct:
            Set CurRow = TblPersonalInfo.Rows(1)
            Set CellsColl = CurRow.Cells
            Set CurCell = CellsColl(0)
   and
            SetCurCell = TblPersonalInfo.Rows.Item(1).Cells.Item(0)
   ?

Thanks
date: Mon, 18 Feb 2008 19:34:22 -0800   author:   JonWayn

Re: Long-hand references vs short-hand   
"JonWayn"  wrote in message
news:8B5512D6-9D06-4C6B-B5C2-B73146A033DF@microsoft.com
> Is there any functional differences between the construct:
>            Set CurRow = TblPersonalInfo.Rows(1)
>            Set CellsColl = CurRow.Cells
>            Set CurCell = CellsColl(0)
>   and
>            SetCurCell = TblPersonalInfo.Rows.Item(1).Cells.Item(0)
>   ?

No, not really. You can make it even shorter:

Set CurCell = TblPersonalInfo.Rows(1).Cells(0)

-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Mon, 18 Feb 2008 22:41:01 -0500   author:   Igor Tandetnik

Re: Long-hand references vs short-hand   
I knew of that usage too: I tend to always use multiple statements thinking 
that referencing a closer relative might have had a more reliable connecton 
than for a more distant relative, and would be less proned to throwing those 
nasty 'Permission Denied' errors.

Thanks for the insight.

"Igor Tandetnik" wrote:

> "JonWayn"  wrote in message
> news:8B5512D6-9D06-4C6B-B5C2-B73146A033DF@microsoft.com
> > Is there any functional differences between the construct:
> >            Set CurRow = TblPersonalInfo.Rows(1)
> >            Set CellsColl = CurRow.Cells
> >            Set CurCell = CellsColl(0)
> >   and
> >            SetCurCell = TblPersonalInfo.Rows.Item(1).Cells.Item(0)
> >   ?
> 
> No, not really. You can make it even shorter:
> 
> Set CurCell = TblPersonalInfo.Rows(1).Cells(0)
> 
> -- 
> With best wishes,
>     Igor Tandetnik
> 
> With sufficient thrust, pigs fly just fine. However, this is not 
> necessarily a good idea. It is hard to be sure where they are going to 
> land, and it could be dangerous sitting under them as they fly 
> overhead. -- RFC 1925 
> 
> 
>
date: Mon, 18 Feb 2008 20:17:00 -0800   author:   JonWayn

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us