Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Graham,
If you put 'Option Compare Text' at the very top of the code module (not the procedure), all text comparisons in that module will be case-insensitive. Short of that, you can use StrComp to compare two strings and see if they are equal. E.g., If StrComp(ActiveWorkbook.Name, "template", vbTextCompare) = 0 Then ' strings are equal Else ' strings are not equal End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Graham" wrote in message ... Hi, I am trying to perform a certain operation via AutoOpen that will only run if the workbook name is "template" for example. If the workbook name is anything else I would like AutoOpen to ignore the procedure. I have been advised to use Option Compare Text, but I don't know how! Help please! Thanks Graham |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare text in cell to custom text format?? | Excel Discussion (Misc queries) | |||
Add a text to rows option | Excel Worksheet Functions | |||
compare side by side tool option | Excel Discussion (Misc queries) | |||
In Excel, option to enter text in cells the same as text boxes | Excel Worksheet Functions | |||
in excel the option to "compare side by side with" is missing. | New Users to Excel |