-
دوشنبه 21 آذر 1390, 14:55 عصر
#1
کاربر جدید
سلام کدهای زیر چی کار مکنند؟
Public Function PassCode(Pass As String) As String
Dim newpas As String
newpas = ""
For i = 1 To Len(Pass)
If Len(Chr$(Asc(Mid(Pass, i, 1)))) = 3 Then
newpas = newpas & Asc(Mid(Pass, i, 1))
Else
newpas = newpas & "0" & Asc(Mid(Pass, i, 1))
End If
Next i
PassCode = newpas
End Function
Public Sub SetGridColumnWidth(grd As MSHFlexGrid)
Dim InnerLoopCount As Long
Dim OuterLoopCount As Long
Dim lngLongestLen As Long
Dim sLongestString As String
Dim lngColWidth As Long
Dim szCellText As String
With grd
For OuterLoopCount = 0 To .Cols - 1
sLongestString = ""
lngLongestLen = 0
For InnerLoopCount = 0 To .Rows - 1
szCellText = .TextMatrix(InnerLoopCount, OuterLoopCount)
If Len(szCellText) > lngLongestLen Then
lngLongestLen = Len(szCellText)
sLongestString = szCellText
End If
Next
lngColWidth = .Parent.TextWidth(sLongestString)
.ColWidth(OuterLoopCount) = lngColWidth + 300
Next
End With
End Sub
برچسب های این تاپیک
قوانین ایجاد تاپیک در تالار
- شما نمی توانید تاپیک جدید ایجاد کنید
- شما نمی توانید به تاپیک ها پاسخ دهید
- شما نمی توانید ضمیمه ارسال کنید
- شما نمی توانید پاسخ هایتان را ویرایش کنید
-
قوانین سایت