From: Norm on
I am really confused now, the following code will return a msgbox for
each entry highlighted, but the registry write which should be writing
an entry for each msgbox is only writing one entry called 0

Dim strSplit() As String
Dim a As Long
strSplit = Split(Command$, ";")
For i = LBound(strSplit) To UBound(strSplit)
If i = LBound(strSplit) Then
a = i
Else
a = a + 1
End If

MsgBox strSplit(a)
fWriteValue "HKCU", SecRep & "\CommandLine", CStr(a), "S"
strSplit(a)
Next i

I don't understand why I have to use "a" as the count, but if I use "i"
the loop will not list anything other than zero.


From: Larry Serflaten on

"Norm" <NormF4(a)Spoof.com> wrote

> There is apparently something going on here that I do not understand.

It sounds like your program is getting called for each item in the
list. Pass in 3 or 4 and see how many instances of your program
get fired up....

LFS


From: Norm on
Larry Serflaten brought next idea :
> "Norm" <NormF4(a)Spoof.com> wrote
>
>> There is apparently something going on here that I do not understand.
>
> It sounds like your program is getting called for each item in the
> list. Pass in 3 or 4 and see how many instances of your program
> get fired up....
>
> LFS


Larry,

You are right, my program gets called once for each entry. The problem
I cannot figure out is how to separate the entries from Command$. If I
separate the entries with msgbox's and check the length they match the
file name. MsgBox must be seeing something to separate the entries, but
I don't know what it is so that I can split Command$ into a countable
array.
Norm


From: Norm on
Larry Serflaten wrote on 5/23/2010 :
> "Norm" <NormF4(a)Spoof.com> wrote
>
>> There is apparently something going on here that I do not understand.
>
> It sounds like your program is getting called for each item in the
> list. Pass in 3 or 4 and see how many instances of your program
> get fired up....
>
> LFS

Yes it is calling the program for each entry into the command line. I
have not been able to figure out what is being used to split the
entries.

Norm


From: Karl E. Peterson on
Norm pretended :
> Larry Serflaten brought next idea :
>> "Norm" <NormF4(a)Spoof.com> wrote
>>
>>> There is apparently something going on here that I do not understand.
>>
>> It sounds like your program is getting called for each item in the
>> list. Pass in 3 or 4 and see how many instances of your program
>> get fired up....
>
> You are right, my program gets called once for each entry.

Then *use* that information to arrive at your solution.

> The problem I
> cannot figure out is how to separate the entries from Command$.

If you're getting one filename per instance, then what's the relevance
of this question?

> If I separate
> the entries with msgbox's and check the length they match the file name.
> MsgBox must be seeing something to separate the entries, but I don't know
> what it is so that I can split Command$ into a countable array.
> Norm

MsgBox doesn't process anything. You seem to be chasing your tail
here, to be polite.