End If
On Error GoTo ProjectNumberNoMatch
lngMatchRow =Application.Match(Me.txtProjectNumber, wsProjectData.Columns(“A”), )
On Error GoTo
‘找到了项目编号.
Me.lblRecordNofTotal = “在 ” & Str(lngLastRow) &” 行中的第” & Str(lngMatchRow) & ” 行”
lngRow = lngMatchRow
PopulateUserForm lngMatchRow
Exit Sub
ProjectNumberNoMatch:
strMsg = “项目编号 ” & Me.txtProjectNumber& ” 没有找到.”
lngStyle = vbOKOnly + vbInformation
strTitle = “没有找到项目编号”
Beep
intResponse = MsgBox(strMsg, lngStyle,strTitle)
End Sub
‘—————————
‘设置导航按钮
‘—————————
Private Sub lblFirst_Click()
lngRow = 2
PopulateUserForm lngRow
Me.lblRecordNofTotal = “在 ” & Str(lngLastRow) &” 行中的第2行”
End Sub
Private Sub lblFirst_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
Me.lblFirst.SpecialEffect =fmSpecialEffectSunken
End Sub
Private Sub lblFirst_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
RestoreBackColors
MouseMove “lblFirst”
End Sub
Private Sub lblFirst_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
Me.lblFirst.SpecialEffect =fmSpecialEffectRaised
End Sub
Private Sub lblLast_Click()
lngRow = lngLastRow
PopulateUserForm lngRow
Me.lblRecordNofTotal = “在 ” & Str(lngLastRow) &” 行中的最后一行”
End Sub
Private Sub lblLast_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
Me.lblLast.SpecialEffect =fmSpecialEffectSunken
End Sub
Private Sub lblLast_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
RestoreBackColors
MouseMove “lblLast”
End Sub
Private Sub lblLast_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
Me.lblLast.SpecialEffect =fmSpecialEffectRaised
End Sub
Private Sub lblNext_MouseDown(ByValButton As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y AsSingle)
Me.lblNext.SpecialEffect =fmSpecialEffectSunken
MouseDownNext
End Sub
Private Sub lblNext_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
RestoreBackColors
MouseMove “lblNext”
End Sub
Private Sub lblNext_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
Me.lblNext.SpecialEffect =fmSpecialEffectRaised
blnMouseDown = False
End Sub
Private Sub lblPrev_MouseDown(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
Me.lblPrev.SpecialEffect =fmSpecialEffectSunken
MouseDownPrevious
End Sub
Private Sub lblPrev_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
RestoreBackColors
MouseMove “lblPrev”
End Sub
Private Sub lblPrev_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X AsSingle, ByVal Y As Single)
Me.lblPrev.SpecialEffect =fmSpecialEffectRaised
blnMouseDown = False
End Sub
Private Sub MouseDownNext()
blnMouseDown = True
Do While blnMouseDown = True
Select Case lngRow
Case lngLastRow
lngRow = lngLastRow
Case Else
lngRow = lngRow + 1
‘到达最后一行
If lngRow >= lngLastRow ThenlngRow = lngLastRow
猜你喜欢
- 替换excel工作表中图片怎么保持图片位置和大小不变?
- 淘宝新店怎么做单量?不做单如何提升基础单量?
- 淘宝回复买家怎么发图片?客服如何接待客户?
- 淘宝新开店铺怎么引流量?引流推广怎么做?
- 淘宝精准人群怎么做?如何设置?
- 淘宝代付怎么操作不了?要注意什么?
- 淘宝开店后没流量怎么办?如何提高流量?
- 触怎么组词
- 超级推荐冷启动需要多久?怎么低价引流?
- 龟头有红点是怎么回事
