Function to read text file; find string; delete same before import

D

Dave Peterson

I don't use regex to be effective. But I can copy and paste (and struggle while
debugging!).
 
D

Dave Peterson

I don't use regex to be effective.
should have been:
I don't use regex enough to be effective.

Using regex can be very effective!
 
R

Rick Rothstein \(MVP - VB\)

Using regex can be very effective!

But they can often require a **lot** of trial and error coding to get them
"exactly right".

Rick
 
E

EagleOne

In your reply you commented "if you have the stand-alone (compiled) Visual Basic program available
(Version 6 only because of the use of the Replace function." This reminded me of compiling "macro
project" into a .DLL which is much more "secure" than a VBProject password; at least that is what I
heard.

All that said, I cheched the price for VB6, about $600, and read that it is essentially orphaned
(not sold by MS) in favor of .NET.

Are there any alternate choices to secure VBA?

TIA EagleOne
 
E

EagleOne

Good point! I tried and found myself doing quite a **lot**. One has to use Regex all the time to
do it quickly like Ron Rosenfeld seems to do/be.
 
D

Dick Kusleika

Dick,

The Function solution has arrived, Thanks.

What are your thoughts as to the below solution as opposed to the Regex?

My point being, that RegEx is probably the best for HUUUUGH files but begs the next issue - RegEx
Reference libraries.

I'm not a regex expert, but that never stops me from giving my opinion. For
me, regex is great when you have a lot of possible strings that can be
distilled down to a few patterns. If you want to delete all the phone
numbers from a text file, my solutions falls flat while regex is the perfect
solution. But for your situation, with only three possible strings, regex
seems like overkill.
 
E

EagleOne

Dick Kusleika said:
I'm not a regex expert, but that never stops me from giving my opinion. For
me, regex is great when you have a lot of possible strings that can be
distilled down to a few patterns. If you want to delete all the phone
numbers from a text file, my solutions falls flat while regex is the perfect
solution. But for your situation, with only three possible strings, regex
seems like overkill.
 
E

EagleOne

Thanks Dick.

A few times I attempted to get my mind around RegEx and found it not very intuitive. Of course I
said that about VBA at one time.
 
E

EagleOne

I guess I do not appreciate the relative cost issues. All I want to do is compile my VBA code into
a DLL. It is quite possible that $600 is worth it.
 
R

RB Smissaert

You can't compile into a dll with VBA, but I believe with FreeBasic you can
and it is free.
Must admit though I have never done it as I have VB6.

RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top