Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compile error: User-defined type not defined | Excel Programming | |||
"User-defined type not defined" message in Excel | Excel Discussion (Misc queries) | |||
Workspace faux user-defined type not defined | Excel Programming | |||
User-defined data type; Error: Only User-defined types... | Excel Programming | |||
Word.Document - user defined type not defined | Excel Programming |