[mso] Re: Excel visual basic command

  • From: "Donald C. Smith" <DCSmith@xxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Mon, 15 Sep 2003 19:35:27 -0400

OK, I was working on it myself as someone by the name of Greg Chapman :-)),
told me last time that he would help me but would not do it for me as it
would not help ME if he did it for me.  I do a lot of work in Excel
(actually too much) but when I finish a book I "select all sheets", go to
options and deselect "gridlines", "row and column headers", "outline
symbols", "zero Values", then I "deselect all sheets".   I then have a macro
to "protect all sheets" and then of course save the book.  All books are
different with different sheet names, sooo don't know if it can be done.
I want to automate:
"select all sheets", go to options and deselect "gridlines", "row and column
headers", "outline symbols", "zero Values", then "deselect all sheets"

Thanks
Don

----------------------------------------------------------------------------
----

To: <mso@xxxxxxxxxxxxx>
Subject: [mso] Re: Excel visual basic command
From: "Greg Chapman" <greg@xxxxxxxxxxxxx>
Date: Mon, 15 Sep 2003 17:52:26 -0500

----------------------------------------------------------------------------
----

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).
//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: