Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Why CreateObject("vbscript.regexp") doesn't work?

On Thu, 15 Apr 2010 11:34:54 -0700, "Joe User" <joeu2004 wrote:

Dim v As Object
v = CreateObject("vbscript.regexp")

I have select Microsoft VBScript Regular Expressions 5.5 (also tried 1.0)
under Tools References.

But nothing is added under VBAProject \ References in the Project pane, as
there is when I select atpvbaen.xls for example.

Is that indicative of the root cause of the problem, perhaps a missing file?

What is the name of the file that contains the Microsoft VBScript Regular
Expressions 5.5 library?



You must SET an object.

Dim v as Object
set v = createobject("vbscript.regexp").

If you select Tools/References VBScript Regular Expressions 5.5, then one
syntax would be:

Dim v as RegExp
Set v = New Regexp
....
....
....
'and maybe
Set v = Nothing
--ron
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
Why CreateObject("vbscript.regexp") doesn't work? Chip Pearson Excel Programming 3 April 16th 10 01:13 AM
How can I get the author of a file using CreateObject("Scripting.FileSystemObject")? Excel 009 Excel Programming 8 November 3rd 06 08:32 PM
Set OutApp = CreateObject("Outlook.Application") - Runtime error 429 Buffyslay Excel Programming 2 July 20th 05 05:06 PM
Excel:Runtime Error 7 "Not enough Memory" with CreateObject (SAP.B sebastienm Excel Programming 0 July 24th 04 08:35 AM
CreateObject("Excel.Application") - Access denied Luca[_2_] Excel Programming 0 February 6th 04 01:21 PM


All times are GMT +1. The time now is 10:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"