Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello,
I'm trying to run a macro (created by Harlan Grove), using Excel 97 under Windows XP SP2, which requires "'Microsoft Scripting Runtime" and "Microsoft VBScript Regular Expressions 1.0". In the VBE under Tools, References, I can find the Scripting Runtime but not the VBScript Regular Expressions listed. As a result, the macro always stops when it gets to "Dim re As New RegExp". I've searched various web sites and it seems that if VBScript is installed (which it is, on my machine version 5.6) the reference should show up, but it doesn't. Could someone please tell me how to find the reference to Microsoft VBScript Regular Expressions 1.0? TIA Regards, John |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this code
Dim re As Object Set re = CreateObject("VBScript.RegExp") rather than Dim re As New RegExp and see whether you still get that problem. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John Taylor" wrote in message ... Hello, I'm trying to run a macro (created by Harlan Grove), using Excel 97 under Windows XP SP2, which requires "'Microsoft Scripting Runtime" and "Microsoft VBScript Regular Expressions 1.0". In the VBE under Tools, References, I can find the Scripting Runtime but not the VBScript Regular Expressions listed. As a result, the macro always stops when it gets to "Dim re As New RegExp". I've searched various web sites and it seems that if VBScript is installed (which it is, on my machine version 5.6) the reference should show up, but it doesn't. Could someone please tell me how to find the reference to Microsoft VBScript Regular Expressions 1.0? TIA Regards, John |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Bob,
Thanks a heap; your suggestion worked like a charm. No sign of the problem now. Easy when you know how. :-) I'm sure I could have searched for weeks and not found any reference to doing what you suggested. Regards, John "Bob Phillips" wrote in message ... Try this code Dim re As Object Set re = CreateObject("VBScript.RegExp") rather than Dim re As New RegExp and see whether you still get that problem. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "John Taylor" wrote in message ... Hello, I'm trying to run a macro (created by Harlan Grove), using Excel 97 under Windows XP SP2, which requires "'Microsoft Scripting Runtime" and "Microsoft VBScript Regular Expressions 1.0". In the VBE under Tools, References, I can find the Scripting Runtime but not the VBScript Regular Expressions listed. As a result, the macro always stops when it gets to "Dim re As New RegExp". I've searched various web sites and it seems that if VBScript is installed (which it is, on my machine version 5.6) the reference should show up, but it doesn't. Could someone please tell me how to find the reference to Microsoft VBScript Regular Expressions 1.0? TIA Regards, John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Substring in excel? How about regular expressions? | Excel Discussion (Misc queries) | |||
Indicate missing number in a sequence (Part II) | Excel Discussion (Misc queries) | |||
need help righting script to sort rows alphabetically then seperate them to line up | Excel Worksheet Functions | |||
Regular expressions in Excel | Excel Discussion (Misc queries) | |||
Using a VB Script for barcodes - new to this | Excel Discussion (Misc queries) |