Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default checking multiple sheets.

Hi,

Can someone please help me with my macro.

I'm trying to create a macro that will check the name of the active sheet
from a list in an array, or something like that, if this sheet is in the
list of named sheets then exit the sub.

Is this possible?

Hope someone can help,
Thanks
Best regards,
Scott


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default checking multiple sheets.

res = application.Match(activesheet.name,Array("sheet1", "sheet2"),0)
if not iserror(res) then
exit sub
End if

--
Regards,
Tom Ogilvy

"Scott" wrote in message
...
Hi,

Can someone please help me with my macro.

I'm trying to create a macro that will check the name of the active sheet
from a list in an array, or something like that, if this sheet is in the
list of named sheets then exit the sub.

Is this possible?

Hope someone can help,
Thanks
Best regards,
Scott




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default checking multiple sheets.

Thanks Tom,

Just one more thing, is there any way of changing this so it is not case
sensitive?

Thanks
Best regards,
Scott






"Tom Ogilvy" wrote in message
...
res = application.Match(activesheet.name,Array("sheet1", "sheet2"),0)
if not iserror(res) then
exit sub
End if

--
Regards,
Tom Ogilvy

"Scott" wrote in message
...
Hi,

Can someone please help me with my macro.

I'm trying to create a macro that will check the name of the active sheet
from a list in an array, or something like that, if this sheet is in the
list of named sheets then exit the sub.

Is this possible?

Hope someone can help,
Thanks
Best regards,
Scott





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default checking multiple sheets.

There is no change required - it isn't case sensitive as written.

--
Regards,
Tom Ogilvy

"Scott" wrote in message
...
Thanks Tom,

Just one more thing, is there any way of changing this so it is not case
sensitive?

Thanks
Best regards,
Scott






"Tom Ogilvy" wrote in message
...
res = application.Match(activesheet.name,Array("sheet1", "sheet2"),0)
if not iserror(res) then
exit sub
End if

--
Regards,
Tom Ogilvy

"Scott" wrote in message
...
Hi,

Can someone please help me with my macro.

I'm trying to create a macro that will check the name of the active

sheet
from a list in an array, or something like that, if this sheet is in the
list of named sheets then exit the sub.

Is this possible?

Hope someone can help,
Thanks
Best regards,
Scott







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default checking multiple sheets.

to match strings whether they are in upper or lower case
use the option:

Option Compare Text

at the top of the module, before the sub

-----Original Message-----
Thanks Tom,

Just one more thing, is there any way of changing this so

it is not case
sensitive?

Thanks
Best regards,
Scott






"Tom Ogilvy" wrote in message
...
res = application.Match(activesheet.name,Array

("sheet1","sheet2"),0)
if not iserror(res) then
exit sub
End if

--
Regards,
Tom Ogilvy

"Scott" wrote in message
...
Hi,

Can someone please help me with my macro.

I'm trying to create a macro that will check the name

of the active sheet
from a list in an array, or something like that, if

this sheet is in the
list of named sheets then exit the sub.

Is this possible?

Hope someone can help,
Thanks
Best regards,
Scott





.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking numbers across various sheets Mike Excel Worksheet Functions 2 February 11th 07 03:40 AM
Checking for Multiple Values guilbj2 Excel Discussion (Misc queries) 8 February 27th 06 08:02 PM
Checking names on correct line across sheets Ali Excel Worksheet Functions 5 January 17th 06 07:24 AM
Checking for a zero value in multiple columns johnsoned Excel Worksheet Functions 2 December 15th 05 12:25 AM
Checking a number of sheets sphenisc Excel Worksheet Functions 1 November 17th 05 06:55 PM


All times are GMT +1. The time now is 09:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"