Drew Wutka
DWUTKA at Marlow.com
Tue Feb 24 18:17:53 CST 2009
First of all, GREAT JOB Max.
Two comments for you.
1. In your 'sGetLanguageCaptions' code, you can simplify your code by
using Split, instead of searching through the string:
Private Sub sGetLanguageCaptions()
' set the caption based on the language selected where language value
is held in glngLangauge variable
Dim ctl As Control, strCaption As String, lng As Long, str As String
Dim strArray() As String
For Each ctl In Me.Controls
If ctl.ControlType = acLabel And Len(ctl.Tag) > 1 Then
strArray = Split(ctl.Tag, "+")
ctl.Caption = strArray(glngLanguage - 1)
End If
Next ctl
End Sub
2. The delimiter should be a non-typable character. You never know
when a typable character will be used in a caption. In your sample, you
used the plus sign. If a caption read: 'Credits+Debits' it would add
another 'element' to what you have stored in the tag. Since some
foreign languages require Unicode, it would probably be better to
'create' a delimiter, instead of using something like chr(240).
Something like '|$@' two or three characters that would be garbage.
Split can use multiple character delimiters.
Drew
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.