[mso] Re: Excel visual basic command

I suppose it would be possible to establish a Range object that addressed
all sheets but dealing with all of them as a collection isn't too painful,
either. For Example:

Sub HowManySheets()
For Each Sheet In Application.Sheets
    MsgBox Sheet.Name
Next Sheet
End Sub

Is a pretty succinct way of getting Excel to cycle through all the sheets
and tell you their names (if that's what you want).

Is there something in particular you were wanting to do once you had all
the sheets selected?

This isntruction:
Application.Sheets.Select

Or this one:
Application.Worksheets.Select

...will both return all the sheets as part of the selection object. But,
what would you be wanting to do then?

Greg Chapman
http://www.mousetrax.com
"Counting in binary is as easy as 01, 10, 11!
With thinking this clear, is coding really a good idea?"


> -----Original Message-----
> From: mso-bounce@xxxxxxxxxxxxx
> [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf Of Donald C. Smith
> Sent: Monday, September 15, 2003 6:36 PM
> To: mso@xxxxxxxxxxxxx
> Subject: [mso] Excel visual basic command
>
>
> I am trying to record and edit a short visual basic program
> to automate a
> process.  I did some research but cannot find a VB command in
> Excel 2000 for
> "Select all sheets" without using an array and naming the
> sheets, then I
> don't need a VB macro if that is the case.
> Thanks
> Don
>

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
http://www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: