Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select all tabs (worksheets) 1

Status
Not open for further replies.

desi5pure

MIS
Mar 29, 2008
38
0
0
US
I would like to do find on whole spreadsheet; is there a way I can select all tabs (sheets) and issue a find command?
 
I've used this macro to select all the sheets for a print preview. However, if you don't know the names of all the sheets then someone else may have an idea how to code it using variables to pick up the sheet names as this method uses the names of the sheets predefined (hard coded).

Code:
Sub PreviewTable()
'
' Macro6 Macro
' Macro recorded 4/17/2006 by ITS Image
'

'
    Sheets(Array("U_DI", "U_Et", "U_EtG", "U_S-D", "U_C-INTL", _
        "U_S-D+INTL", "U_FG", "U_AC", "G_DI", "G_Et", "G_EtG", "G_S-D", "G_C-INTL", _
        "G_S-D+INTL")).Select
    ActiveWindow.SelectedSheets.PrintPreview
End Sub
 
Thanks for sharing your macro.
That's a very neat macro if you know names of all your tabs. I am sure someone knows how to get names of all tabs so (a) you don't have to hard code it and (b) if you add/delete shheets, you don't have to update the macro.
 
desi5pure said:
I would like to do find on whole spreadsheet; is there a way I can select all tabs (sheets) and issue a find command?
Given the forum in which you posted, I'm assuming that you aren't necessarily looking for a VBA-solution.

Yes, you can do this. Just select all worksheets before doing the find.

Select the first worksheet, Hold down [Shift], then select the last worksheet. Now [Ctrl]+[F] to find.

Alternately, you can Right Click on any sheet and select Select All Sheets.

[tt][blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ 181-2886 before posting.
 


This can be done WITHOUT VBA code.

Edit > Find - Within WORKBOOK

You can FIND ALL or Find NEXT.



Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 



..oh yes, and FIRST open the OPTIONS in the FIND window..

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Thanks all. I forgot that 'Find' has option to select from current sheet or workbook. It's lot easier.
Once again, thanks all for sharing.
 
desi5pure,

'Round here, folks have something they do when someone else makes a helpful post. Hint, it has to do with a little pink star. It also has to do with a little link that says [blue]Thank whomever for this valuable post![/blue].

Just thought I'd pass that along, in case you hadn't noticed it yet, as I noticed you had posted 16 different questions over about a year, but no "thanks" given through the generally accepted medium of a click. [wink]

--

"If to err is human, then I must be some kind of human!" -Me
 
kjv1611: Thanks for reminding me. I did vote for you and other members who posted.
In my opinion, everyone who posts (even if their input is not helpful) should be thanked either by 'generally accepted medium of a click' as you put it or a thank you note via posts.
I have always thanked people who respond (may be not individually but as a group). If people prefer 'generally accepted medium of a click', I would try to use it more often.
 
Yes, the reason why the click is the preferred method is for a couple of reasons:
[ol][li](Most importantly), if YOU found it helpful, then someone else might as well. This can help people when they are searching. If they see a thread with 5 stars, for instance, and another with no stars, and both seem to mention their topic material, the 5 star one may very well have the best information.[/LI]
[LI]The other reason is just I don't know sort of like a "badge" for those who did a good job. Nobody gets paid for helping, but for most people I suppose, being able to look and see they have X "thank you's" can I suppose give them a way to see or think that perhaps they've done something good by helping somebody else....[/LI]
[/OL]

And all of that goes to the whole users helping users deal. I know I have been getting help from other t-t'ers over the years, and I've at least tried to help where I thought I could. It works out quite well that way. [wink]

--

"If to err is human, then I must be some kind of human!" -Me
 
i hope you mean workbook when you say "spreadsheet" (i would equate a spreadsheet to what is on a tab).

to select several sheets in a workbook, select the first sheet you want by clicking on the tab. assuming for the moment you want the next 'n' sheets, SCROLL over to the last sheet, hold down the SHIFT key, and click on the tab. all the tabs between the first and last sheet will be selected. this works with any number of sheets, but there's no need (as SkipVought has pointed out) to use this method for all the sheets in a workbook.

if you want to select more than one sheet but not contiguously, use the same method as above, but hold down the CTRL key and click on each tab you wish to select.

per ardua ad astra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top