|
楼主 |
发表于 2023-6-10 09:16
|
显示全部楼层
下面几段代码是否有关呢,我是一点也看不懂,拜托大神
Public Sub ShowMeasDetails()
Const PROC_NAME As String = "clsMeasDetails/ShowMeasDetails"
On Error GoTo MyErr
With frmLed
.cboCat.Text = mCat
.cboGroup.Text = mGroup
.cboProductName.Text = mProductName
.txtUsage.Text = mUsage
.txtCreationDate.Text = FORMAT(mCreationDate, "yyyy/m/d")
.txtRefeNo.Text = mRefeNo
.txtUniqueNo1.Text = mUniqueNo1
.txtUniqueNo2.Text = mUniqueNo2
.cboManaClass.Text = mManaClass
.txtCalCycle.Text = mCalCycle
.txtExpDateYear.Text = FORMAT(mExpDate, "yyyy")
.txtExpDateMonth.Text = FORMAT(mExpDate, "m")
'有効期限残月表示
Call ShowExpDateTimeLimit
.txtRemarks.Text = mRemarks
.txtMaker.Text = mMaker
.txtModel.Text = mModel
.txtScaleInterVal.Text = mScaleInterval
.txtMeas.Text = mMeas
.txtOthersSpec.Text = mOthersSpec
Call basFrmLed.ShowRefeSign
Call basFrmLed.ShowStandardCalCycle
End With
Exit Sub
'**********************************************************
'機能 :日付を揃える
'引数 :convDate-変換する日付
'戻り値 :日付
'**********************************************************
Public Function AlignDate(ByVal convDate As Variant) As String
Const CONV_POS As Long = 10 '変換基準値
If IsDate(convDate) = True Then
If Month(convDate) < CONV_POS And Day(convDate) < CONV_POS Then
AlignDate = FORMAT(convDate, "yyyy. m. d")
ElseIf Month(convDate) < CONV_POS And Day(convDate) >= CONV_POS Then
AlignDate = FORMAT(convDate, "yyyy. m.dd")
ElseIf Month(convDate) >= CONV_POS And Day(convDate) < CONV_POS Then
AlignDate = FORMAT(convDate, "yyyy.mm. d")
Else
AlignDate = FORMAT(convDate, "yyyy.mm.dd")
End If
Else
AlignDate = convDate
End If
End Function
Public Sub RegisterFrmLedInClipBoard()
Const PROC_NAME As String = "basFrmLedClipBoard/RegisterFrmLedInClipBoard"
On Error GoTo MyErr
Dim myWs As Worksheet 'クリップボードシート
Dim myClm As Long 'クリップボードシート列
Dim myExpDate As String '有効期限
Set myWs = VBAProject.wsclipBoard
myClm = GetWsClipBoardClm
Call ClearClipBoard
With frmLed
myWs.Cells(WsClipRow.WsClipRow_CopyDate, myClm).Value = Date & " " & Time
myWs.Cells(WsClipRow.WsClipRow_RefeNo, myClm).Value = .txtRefeNo.Text
myWs.Cells(WsClipRow.WsClipRow_UniqueNo1, myClm).Value = .txtUniqueNo1.Text
myWs.Cells(WsClipRow.WsClipRow_UniqueNo2, myClm).Value = .txtUniqueNo2.Text
myWs.Cells(WsClipRow.WsClipRow_Cat, myClm).Value = .cboCat.Text
myWs.Cells(WsClipRow.WsClipRow_Group, myClm).Value = .cboGroup.Text
myWs.Cells(WsClipRow.WsClipRow_ProductName, myClm).Value = .cboProductName.Text
myWs.Cells(WsClipRow.WsClipRow_Usage, myClm).Value = .txtUsage.Text
myWs.Cells(WsClipRow.WsClipRow_Remarks, myClm).Value = .txtRemarks.Text
myWs.Cells(WsClipRow.WsClipRow_ManaClass, myClm).Value = .cboManaClass.Text
myWs.Cells(WsClipRow.WsClipRow_CalCycle, myClm).Value = .txtCalCycle.Text
myExpDate = .txtExpDateYear.Text & "/" & .txtExpDateMonth.Text & "/1"
If IsDate(myExpDate) = True Then
myWs.Cells(WsClipRow.WsClipRow_ExpDate, myClm).Value = FORMAT(myExpDate, "yyyy/m")
Else
myWs.Cells(WsClipRow.WsClipRow_ExpDate, myClm).Value = .txtExpDateYear.Text & _
.txtExpDateMonth.Text
End If
myWs.Cells(WsClipRow.WsClipRow_Maker, myClm).Value = .txtMaker.Text
myWs.Cells(WsClipRow.WsClipRow_Model, myClm).Value = .txtModel.Text
myWs.Cells(WsClipRow.WsClipRow_ScaleInterval, myClm).Value = .txtScaleInterVal.Text
myWs.Cells(WsClipRow.WsClipRow_Meas, myClm).Value = .txtMeas
myWs.Cells(WsClipRow.WsClipRow_OthersSpec, myClm).Value = .txtOthersSpec.Text
End With
GoSub Finally
Exit Sub
|
|