![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
Question:
I have a macro that search the data of the worksheet. I am trying to do the search on more the one worksheets in a workbook at the same time. So, I selected all the worksheets before I run the macro. However, it only searchs the opened worksheet but not the others. So is there a way to solve this problem? Please help Thanks in advance |
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
http://www.mrexcel.com/board/viewtop...1669&forum=2&2 I tested his code and it worked fine for me. Please post your code and I'll see if I can help. Regards,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
I put the following code in ThisWorkBook(isn't it)?
Sub SearchAllSheets() For Each Worksheet In Worksheets Sheets(Worksheet.Name).Select Call Main Next Worksheet End Sub |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Oh I think I run the wrong macro
But when I run the correct macro it asks me for inputting the value for each sheet. So I need to enter the value 4 times if I have 4 sheets. So is it possible that I only have to enter once and the macro can search all the sheets at the same time? Thanks in advance |
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
Regards,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
|
|
#6 | |
|
Guest
Posts: n/a
|
Quote:
So, is there a way to search once and run on all the sheets at the same time? |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|