Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checking numbers across various sheets | Excel Worksheet Functions | |||
Checking for Multiple Values | Excel Discussion (Misc queries) | |||
Checking names on correct line across sheets | Excel Worksheet Functions | |||
Checking for a zero value in multiple columns | Excel Worksheet Functions | |||
Checking a number of sheets | Excel Worksheet Functions |