is not possible.
Worksheets is a set of dependent objects of workbook.
use the Properity WorkShets is the only way to return this set.

viceversa you could use a array of worksheet

Sub test()
Dim wb As Workbook
Dim ws As Worksheet
Dim wss() As Worksheet
Dim l As Long

Set wb = ThisWorkbook
For Each ws In wb.Worksheets
    ReDim wss(l)
    Set wss(l) = ws
    l = l + 1
Next
End Sub

but would get the same result
regards
r



On 24 Set, 00:55, cyber 1000s <[email protected]> wrote:
> Hi,
>
> I'm looking for a more general answer about objects in vba like :
>
> dim ws as object
> set ws = worksheets
>
> For i = 1 To wkb.Worksheets.Count
>   wkb.Sheets(3).Cells(i, 4) = wkb2.Worksheets(i).Name
>
> It's ok until the last line, i understand what little there is to
> understand (pointed notation?).
> But is there any reason why instead of   wkb2.Worksheets(i).Name i
> can't have wkb2.ws(i).Name ?
>
> Thx

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to [email protected]

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to