Interesting debate. And the beginner here is only grasping the thin surface of it. Bit like discussing black holes with Stephen Hawking; your explanations sound solid and clever, but it takes me an hour or so to understand what and why.
Anyway, if I got it right, the answer for strongm must be...
Interesting debate. And the beginner here is only grasping the thin surface of it. Bit like discussing black holes with Stephen Hawking; your explanations sound solid and clever, but it takes me an hour or so to understand what and why.
Anyway, if I got it right, the answer for strongm must be...
Interesting Hughlerwill.
Am gonna try it.
Wonder: Would it take all files in a directory if I change code to:
Dim Item As String
Item = Dir$("C:\MyDir\*.*")
List1.AddItem Item
Cause I need that later in my coding.
You are right, strongm. There are plenty of methods.
And I have found a way, probably somewhat unorthodox and with a very long coding. But that is the way it is with languages: When you are a beginner, you use many words to describe simple issues.
Nevertheless, I thankfully bookmark every...
Just what I figured after an day of testing.
I guess I just have to find another way of determining whether a filename already exists or not and make my program do one thing if it does and another if it does not.
But thanks strongm for saving more of my breath on this dead end.
HughLerWill, thanks
That's what I thought at first (seems logical), but it does not work.
I get the MsgBox Prompt:=("OverwritePrompt Dialog Box appeared") every time.
If takes the if-statement either way.
I figured the logic is that the With statement actually says: CommonDialog1.Flags =...
Is it possible to use cdlOFNOverwritePrompt as condition?
To be specific: I wish to let my program act in one way if cdlOFNOverwritePrompt dialog box appears during runtime and another way if it does not.
A simple coding example:
With CommonDialog1
.Flags = cdlOFNOverwritePrompt...
Thanks strongm
I am aware of that, yes.
In the current situation, user is not allowed to decide the extension, it is automatically added in the coding.
Unless of course, user inputs "Test.txt", but then the actuael filename would be: "Test.txt.txt". Quite rare, I think. I mean, when I save a...
Noted, thanks.
However, I specifically want the end of a word to be deleted. I do not care about the beginning, cause I do not know which word the user chooses, as wrote previously in this thread.
To be absolutely concrete, I wish to remove file-extensions, e.g. "Test.txt", so I can use the...
Wow!
That was new to me.
You are absolutely right, I wanted both variables to be strings.
So I guess it should write:
Dim Word As String, Result As String
or maybe even:
Dim Word As String
Dim Result As String
My program and code is probably too small to register any significant slow...
Thx for your reply strongm
I did, in fact, investigate the Len function, but in vain.
However pondering deeper, after your post, I suddenly Heurekaed it:
Dim Word, Result as String
Word = Text1.Text
Result= Len(Word) - 4
Text2.Text = Left(Word, Result)
I love logic when it is logical :-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.