Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sheet Name Character String


Hey guys, Thanks for your help in advance.

I need to run a macro on a database pull but if a 9 is in the first 1
characters of the name of the sheet, I need to do one specified action
if it is not there, I do another action.

I have this set up in excel, which works, but is very slow. Is ther
some way of doing this all within VBA, so the process can be sped up.
Thanks again for all your help

--
trickdo
-----------------------------------------------------------------------
trickdos's Profile: http://www.excelforum.com/member.php...nfo&userid=940
View this thread: http://www.excelforum.com/showthread.php?threadid=26550

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Sheet Name Character String

Trick,

In VBA:

If InStr(1, Left(ActiveSheet.Name, 10), "9") Then
MsgBox "It's contains a 9"
Else
MsgBox "It doesn't contain a 9"
End If

HTH,
Bernie
MS Excel MVP

"trickdos" wrote in message
...

Hey guys, Thanks for your help in advance.

I need to run a macro on a database pull but if a 9 is in the first 10
characters of the name of the sheet, I need to do one specified action,
if it is not there, I do another action.

I have this set up in excel, which works, but is very slow. Is there
some way of doing this all within VBA, so the process can be sped up.
Thanks again for all your help.


--
trickdos
------------------------------------------------------------------------
trickdos's Profile:

http://www.excelforum.com/member.php...fo&userid=9405
View this thread: http://www.excelforum.com/showthread...hreadid=265509



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
Removing character in a string MikeL Excel Discussion (Misc queries) 2 December 3rd 09 08:11 PM
FIND 2nd character in a string Fuzzy Excel Worksheet Functions 7 September 1st 09 08:14 AM
Finding a Character in a String Using VBA BVass Excel Discussion (Misc queries) 2 April 9th 09 03:52 AM
Excel-Match 1st text character in a string to a known character? bushlite Excel Worksheet Functions 2 January 15th 07 06:36 PM
Splitting Character String mcertini Excel Worksheet Functions 2 September 12th 05 09:41 AM


All times are GMT +1. The time now is 02:20 AM.

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"