Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default VB Script Regular Expressions - Missing

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default VB Script Regular Expressions - Missing

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default VB Script Regular Expressions - Missing

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
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
Substring in excel? How about regular expressions? Samuel Excel Discussion (Misc queries) 8 May 22nd 06 04:43 PM
Indicate missing number in a sequence (Part II) mmock Excel Discussion (Misc queries) 3 February 22nd 06 07:13 PM
need help righting script to sort rows alphabetically then seperate them to line up [email protected] Excel Worksheet Functions 0 November 15th 05 01:23 AM
Regular expressions in Excel vigi98 Excel Discussion (Misc queries) 3 November 10th 05 04:40 PM
Using a VB Script for barcodes - new to this Jon Excel Discussion (Misc queries) 2 May 13th 05 02:42 PM


All times are GMT +1. The time now is 06:53 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"