shorthand notation of ActiveWorkbook.Sheets

A

Amedee Van Gasse

I'd like to use a shorthand notation of ActiveWorkbook.Sheets because I use
it a lot.
This does not work:

Dim aws As New Collection
Set aws = ActiveWorkbook.Sheets()

Error 13 on the line with Set.
 
J

John Sanders

This worked in this one example, although I didn't extensively test it...


Dim wbs As Variant
Set wbs = ActiveWorkbook.Sheets
wbs(1).Name = "BOB"


John Sanders


"Amedee Van Gasse"
 
A

Alex Ivanov

Dim ss As Excel.Sheets
Set ss = ActiveWorkbook.Sheets


--
Please reply to NG only. The email address is not monitored.

Alex.

"Amedee Van Gasse"
 
A

Amedee Van Gasse

Alex Ivanov <mailto:[email protected]> leverde op 16 jun 2004 een
briljante bijdrage in <Klik
op deze link om het bericht in zijn oorspronkelijke context te lezen:
Dim ss As Excel.Sheets
Set ss = ActiveWorkbook.Sheets

tnx, it worked

--
Amedee Van Gasse
http://www.amedee.be

Dit bericht is geplaatst in een nieuwsgroep. Post je evt antwoord of
vervolgvraag graag in de nieuwsgroep a.u.b.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top