Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default User-defined type not defined


"Walter Briscoe" wrote in message
...
In message of Tue, 29 Nov 2016 14:40:03 in
microsoft.public.excel.programming, GS writes
Better help if you show the offending code!


Garry,
I DID show offending code.
I will try again.
I have just recorded and edited the following code:

Option Explicit

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 30/11/2016 by IBM
'
Dim RE As Regexp
'
End Sub

When compiled, it gets
Compile error
User-defined type not defined

I happen to "know" the way to deal with this is to add a reference to
Microsoft Vbscript Regular Expressions 1.0 or 5.5.
How would I find that out, if I did not have that "knowledge"?
I mentioned "Windows Scripting Secrets" code which enumerates all
typelibs. I am looking for VBA code with the same capability.
--
Walter Briscoe


Bit confused with what you're doing and why.

First, you say you set the reference, can you see in object browser (ensure
your file is selected), if it is you should see RegExp listed in Classes. If
it's not there what are you using Win64, if so is your Office default 32 or
64 bit. Either way, if you are in Win64 did you set the correct reference
for your office version.

Not sure if related but FWIW there were some recent vbscript updates
recently, typically for security reasons but they sometimes cause problems.
If it was working but nothing has changed in your setup try rolling back.

Second, I don't follow the rest of what you say, "with the same
capability" - do to what?

I agree with Garry, develop with Early Binding, then adapt and distribute
with Late Binding for a better chance of finding it in different setups.

Peter T


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
Compile error: User-defined type not defined Ayo Excel Programming 3 April 23rd 09 07:42 PM
"User-defined type not defined" message in Excel RW1946 Excel Discussion (Misc queries) 0 August 31st 05 12:14 PM
Workspace faux user-defined type not defined Chris S[_2_] Excel Programming 3 November 11th 04 05:51 PM
User-defined data type; Error: Only User-defined types... tiger_PRM Excel Programming 1 July 18th 04 03:32 PM
Word.Document - user defined type not defined jowatkins[_7_] Excel Programming 0 January 20th 04 08:46 AM


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