04-27-2024, 03:46 PM
(04-27-2024, 03:31 PM)SMcNeill Wrote:(04-27-2024, 01:46 PM)bplus Wrote:(04-27-2024, 02:42 AM)SMcNeill Wrote: Bada Bing!! You're welcome, oh ye of little faith.
Now your code is beginning to look more like the one which I shared from the beginning for you. it would also complain of the same "invalid value"
+1 ok this has been quite an adventure past couple days
i would probably have been onto it quicker had you shared the file you were using with code in zip but still a hard won lesson will be likely remembered better/longer.
i wonder if that trick will help the other version of anaCode with all the letter counts or PeteCode ?
I didn't have your file, but I figured you'd just swap dictionary names for testing purposes.
Guess that'll show me!
coulda, shoulda, must of been feel'n lazy...
holy cow! Bind$() puts PeteCode3$ back on top!
compare
Code: (Select All)
Function petecode2$ (la$)
Dim rtn$, i%, seed%, j%, a$
a$ = UCase$(la$)
rtn$ = Space$(Len(a$))
For i% = 65 To 90
seed% = InStr(a$, Chr$(i%))
While seed%
j% = j% + 1
Mid$(rtn$, j%) = Chr$(i%)
seed% = InStr(seed% + 1, a$, Chr$(i%))
Wend
Next
petecode2$ = _Trim$(rtn$)
End Function
Function petecode3$ (la$)
Dim rtn$, i%, seed%, j%, a$
Dim t$(1 To Len(la$))
a$ = UCase$(la$)
For i% = 65 To 90
seed% = InStr(a$, Chr$(i%))
While seed%
j% = j% + 1
t$(j%) = Chr$(i%)
seed% = InStr(seed% + 1, a$, Chr$(i%))
Wend
Next
petecode3$ = bind$(t$())
End Function
oh got to clean code and run tests with browser off...
b = b + ...