Thread View: comp.lang.basic.visual.misc
1 messages
1 total messages
Started by Auric__
Mon, 26 Jan 2026 20:55
Re: vbScript
Author: Auric__
Date: Mon, 26 Jan 2026 20:55
Date: Mon, 26 Jan 2026 20:55
23 lines
1759 bytes
1759 bytes
Wendelin Uez wrote: > This simple Script >> Dim Filename, Pattern, OK >> Filename = "xy.pdf" >> Pattern = "*.pdf" >> OK = "11.pdf" Like "*.pdf" > always returns "sub or function procedure not defined" for line 4 > but why? I'm pretty sure VBscript doesn't have the "Like" operator. In this specific case, just check the extension: Dim Filename, Pattern, OK Filename = "xy.pdf" Pattern = ".pdf" OK = (Right(LCase(Filename), Len(Pattern)) = LCase(Pattern)) Note the "*" was removed from Pattern. -- Look, it's everybody's favorite rich girl/goddess of discord, Eris Hilton!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads