Forum: สอบถามปัญหา Notes ทางด้านพัฒนาโปรแกรม (Note Client) |
Tags1: | Created on May 5, 2009, 8:42 PM by 9notes/9Notes|Topic Responses: 17 |
&action=openDocument&documentId=2FFE |
ขออภัยครับ ตรงบรรทัด writelog ให้เอาออกครับ ปกติผมจะใส่ไว้เพื่อเขียน log ให้รู้ว่าโปรแกรมเวลา complie ผ่านก็จริง แต่เวลา runtime อาจจะมี error ได้ครับ เอาไว้ monitor ดู error ของระบบเวลาใช้งานจริงครับ ค่อย ๆ ปรับ ค่อย ๆ แก้ไปจนสุดท้ายก็ไม่มี error ครับ
Function UDFRepeat(RString As String, Num As Long, Count As Long) As String
On Error Goto Errhandle
AString = ""
For i = 1 To Count - Len(Cstr(Num))
AString = AString & RString
Next
UDFRepeat = AString & Cstr(Num)
Exit Function
Errhandle:
Print "Error in UDFRepeat Function Code : " & Cstr(Err) & " Line : " & Cstr(Erl) & " Description : " & Cstr(Error)
Resume TheEnd
TheEnd:
Repeat = ""
End Function
[quote]
Function UDFRepeat(RString As String, Num As Long, Count As Long) As String
On Error Goto Errhandle
AString = ""
For i = 1 To Count - Len(Cstr(Num))
AString = AString & RString
Next
UDFRepeat = AString & Cstr(Num)
Exit Function
Errhandle:
Print "Error in " & Getthreadinfo(LSI_THREAD_PROC) & " Code : " & Cstr(Err) & " Line : " & Cstr(Erl) & " Description : " & Cstr(Error)
If note Is Nothing Then
Set note = New NotesDocument(db)
End If
note.Procedure = Getthreadinfo(LSI_THREAD_PROC)
Call WriteLogFile(note)
Resume TheEnd
TheEnd:
Repeat = ""
End Function
[/quote]
[quote] :yellow_redface.gif: คือผมไม่ใช่คุณ siamnote หรอกครับผมเอา script ของเค้ามาใช้
นะครับ .... ส่วนที่คุณ 9notes แนะนำผมจะขอเอาไปลองก่อนนะครับ ขอบคุณมากครับผม [/quote] |
|