I am using this forum and getting advanced in my project. Thanks to all. One more support is required.
When I recall the images from the worksheet cells everytime there are some images not loaded. If i reload the userform and recall the data to edit, other image boxes are ok and the one loaded earlier is not loading.
Tried to refresh the pages in screenupdating / move page up/down, still same issue.
Not sure where the problem is.
The related code
When I recall the images from the worksheet cells everytime there are some images not loaded. If i reload the userform and recall the data to edit, other image boxes are ok and the one loaded earlier is not loading.
Tried to refresh the pages in screenupdating / move page up/down, still same issue.
Not sure where the problem is.
The related code
Code:
Private Sub btnSearch_Click()Call ClearClipboard
Me.btnSearch.Visible = True
Me.CBSearchCatagory.Visible = True
Me.CBSearchResult.Visible = True
Me.cmdUpdate.Visible = True
Me.cmdAdd.Visible = True
AgainFromBeginning:
Dim FoundCell As Range
If Me.CBSearchResult.Value = "" Then
Me.tbCVCNo.Enabled = True
With Me.CBSearchResult
End With
If Me.CBSearchCatagory.Value = "Search by CVC Number" Or _
Me.CBSearchCatagory.Value = "Search by Nasico UID Number" Or _
Me.CBSearchCatagory.Value = "Search by Tag Number" Or _
Me.CBSearchCatagory.Value = "Search by Customer" Or _
Me.CBSearchCatagory.Value = "Search by Valve Manufacturer" Or _
Me.CBSearchCatagory.Value = "Search by Job Number" And _
Me.CBSearchResult = "" Then Exit Sub
Me.CBSearchResult.Visible = True
End If
If Me.CBSearchResult.ListIndex = 0 Then
Beep
Exit Sub
End If
If Me.CBSearchCatagory.Value = "Search by CVC Number" And Me.tbCVCNo.Value = Me.CBSearchResult Then
With CBSearchResult
Application.ScreenUpdating = False
Set FoundCell = Cells.Find(what:=Me.CBSearchResult.Value, _
After:=Cells(1), _
LookIn:=xlValues, _
lookat:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False)
If Not FoundCell Is Nothing Then
' Set MoveToTwoRowsDown = FoundCell.Offset(2, 0)
Beep
Me.tbUIDNO.Value = FoundCell.Offset(0, 1).Value
Me.tbTAGNO.Value = FoundCell.Offset(0, 2).Value
Me.tbCUSTOMER.Value = FoundCell.Offset(0, 3).Value
Me.TextBox304.Value = FoundCell.Offset(0, 3).Value
'...........
'.......
'...
If FoundCell.Offset(0, 463).Value = "AFO" Then Me.OptionButton72.Value = True
If FoundCell.Offset(0, 463).Value = "AFC" Then Me.OptionButton73.Value = True
' Call ClearClipboard
'Picture1-Comment Copy to userform
'Picture1-Label Copy to userform
Dim wsImageCopies1, wsinit1 As Worksheet
Dim oImage As image
Dim oShape, CopyImage1, PasteImage1 As shape
Dim oChart As Chart
Dim sTempFilename1, strInitDir1 As String
Dim s As Double
Dim l As Double
Dim t As Double
Dim h As Double
'Assign a filename for the temporary image
sTempFilename1 = Environ("temp") & "\temp_" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
'Dim s, l, t, h As Long
s = 260
t = 100
l = 24
h = 24
Application.ScreenUpdating = False
Application.EnableEvents = False
'==============================================================================================
'Picture-1
If FoundCell.Offset(0, 484).Text > 0 Then
MultiPage1.Pages.Add
Dim lblCaption1 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption1 = MultiPage1.Pages(7).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption1
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l
.Top = t + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 484).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage = Me.MultiPage1.Pages(7).Controls.Add("Forms.Image.1")
With oImage
.Name = "image1"
.Left = l
.Top = t
.Width = s
.Height = s
Worksheets("Data").Cells(FoundCell.Row, "QW").CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(7).image1.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(7).image1.Picture.Visible = True
Me.Repaint
End With
' Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-2
Dim oImage2 As image
Dim CopyImage2 As shape
Dim sTempFilename2 As String
'Assign a filename for the temporary image
sTempFilename2 = Environ("temp") & "\temp_" & "2" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
If FoundCell.Offset(0, 485).Text > 0 Then
Dim lblCaption2 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption2 = MultiPage1.Pages(7).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption2
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l + s + l
.Top = t + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 485).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage2 = Me.MultiPage1.Pages(7).Controls.Add("Forms.Image.1")
With oImage2
.Name = "image2"
.Left = l + s + l
.Top = t
.Width = s
.Height = s
Worksheets("Data").Cells(FoundCell.Row, "QX").CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(7).Image2.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(7).Image2.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-3
If FoundCell.Offset(0, 486).Text > 0 Then
Dim CopyImage3 As shape
Dim oImage3 As image
Dim sTempFilename3 As String
sTempFilename3 = Environ("temp") & "\temp_" & "3" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
Dim lblCaption3 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption3 = MultiPage1.Pages(7).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption3
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l
.Top = t + s + h + h + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 486).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage3 = MultiPage1.Pages(7).Controls.Add("Forms.Image.1")
With oImage3
.Name = "image3"
.Left = l
.Top = t + s + h + l
.Width = s
.Height = s
'Set CopyImage2 = Worksheets("Data").Cells(FoundCell.Offset, "QX")
Worksheets("Data").Cells(FoundCell.Row, "QY").CopyPicture xlScreen, xlPicture
' CopyImage2.CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(7).image3.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(7).image3.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-4
If FoundCell.Offset(0, 487).Text > 0 Then
Dim CopyImage4 As shape
Dim oImage4 As image
Dim sTempFilename4 As String
sTempFilename4 = Environ("temp") & "\temp_" & "4" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
Dim lblCaption4 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption4 = MultiPage1.Pages(7).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption4
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l + s + l
.Top = t + s + h + h + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 487).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage4 = MultiPage1.Pages(7).Controls.Add("Forms.Image.1")
With oImage4
.Name = "image4"
.Left = l + s + l
.Top = t + s + h + l
.Width = s
.Height = s
'Set CopyImage2 = Worksheets("Data").Cells(FoundCell.Offset, "QX")
Worksheets("Data").Cells(FoundCell.Row, "QZ").CopyPicture xlScreen, xlPicture
' CopyImage2.CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(7).image4.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(7).image4.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
ActiveWindow.SmallScroll down:=1
ActiveWindow.SmallScroll up:=1
Application.ScreenUpdating = True
Application.EnableEvents = True
Me.Repaint
Call ClearClipboard
'==============================================================================================
'Picture-5
Dim oImage5 As image
Dim CopyImage5 As shape
Dim sTempFilename5 As String
'Assign a filename for the temporary image
sTempFilename5 = Environ("temp") & "\temp_" & "5" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
If FoundCell.Offset(0, 488).Text > 0 Then
MultiPage1.Pages.Add
Dim lblCaption5 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption5 = MultiPage1.Pages(8).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption5
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l
.Top = t + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 488).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage5 = Me.MultiPage1.Pages(8).Controls.Add("Forms.Image.1")
With oImage5
.Name = "image5"
.Left = l
.Top = t
.Width = s
.Height = s
Worksheets("Data").Cells(FoundCell.Row, "RA").CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(8).image5.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(8).image5.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-6
Dim oImage6 As image
Dim CopyImage6 As shape
Dim sTempFilename6 As String
'Assign a filename for the temporary image
sTempFilename6 = Environ("temp") & "\temp_" & "6" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
If FoundCell.Offset(0, 489).Text > 0 Then
Dim lblCaption6 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption6 = MultiPage1.Pages(8).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption6
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l + s + l
.Top = t + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 489).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage6 = Me.MultiPage1.Pages(8).Controls.Add("Forms.Image.1")
With oImage6
.Name = "image6"
.Left = l + s + l
.Top = t
.Width = s
.Height = s
Worksheets("Data").Cells(FoundCell.Row, "RB").CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(8).image6.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(8).image6.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-7
If FoundCell.Offset(0, 490).Text > 0 Then
Dim CopyImage7 As shape
Dim oImage7 As image
Dim sTempFilename7 As String
sTempFilename7 = Environ("temp") & "\temp_" & "7" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
Dim lblCaption7 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption7 = MultiPage1.Pages(8).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption7
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l
.Top = t + s + h + h + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 490).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage7 = MultiPage1.Pages(8).Controls.Add("Forms.Image.1")
With oImage7
.Name = "image7"
.Left = l
.Top = t + s + h + l
.Width = s
.Height = s
'Set CopyImage2 = Worksheets("Data").Cells(FoundCell.Offset, "QX")
Worksheets("Data").Cells(FoundCell.Row, "RC").CopyPicture xlScreen, xlPicture
' CopyImage2.CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(8).image7.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(8).image7.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-8
If FoundCell.Offset(0, 491).Text > 0 Then
Dim CopyImage8 As shape
Dim oImage8 As image
Dim sTempFilename8 As String
sTempFilename8 = Environ("temp") & "\temp_" & "8" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
Dim lblCaption8 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption8 = MultiPage1.Pages(8).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption8
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l + s + l
.Top = t + s + h + h + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 491).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage8 = MultiPage1.Pages(8).Controls.Add("Forms.Image.1")
With oImage8
.Name = "image8"
.Left = l + s + l
.Top = t + s + h + l
.Width = s
.Height = s
'Set CopyImage2 = Worksheets("Data").Cells(FoundCell.Offset, "QX")
Worksheets("Data").Cells(FoundCell.Row, "RD").CopyPicture xlScreen, xlPicture
' CopyImage2.CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(8).image8.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(8).image8.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
ActiveWindow.SmallScroll down:=1
ActiveWindow.SmallScroll up:=1
Application.ScreenUpdating = True
Application.EnableEvents = True
Me.Repaint
Call ClearClipboard
'==============================================================================================
'Picture-9
Dim oImage9 As image
Dim CopyImage9 As shape
Dim sTempFilename9 As String
'Assign a filename for the temporary image
sTempFilename9 = Environ("temp") & "\temp_" & "9" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
If FoundCell.Offset(0, 492).Text > 0 Then
MultiPage1.Pages.Add
Dim lblCaption9 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption9 = MultiPage1.Pages(9).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption9
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l
.Top = t + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 492).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage9 = Me.MultiPage1.Pages(9).Controls.Add("Forms.Image.1")
With oImage9
.Name = "image9"
.Left = l
.Top = t
.Width = s
.Height = s
Worksheets("Data").Cells(FoundCell.Row, "RE").CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(9).image9.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(9).image9.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-10
Dim oImage10 As image
Dim CopyImage10 As shape
Dim sTempFilename10 As String
'Assign a filename for the temporary image
sTempFilename10 = Environ("temp") & "\temp_" & "10" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
If FoundCell.Offset(0, 493).Text > 0 Then
Dim lblCaption10 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption10 = MultiPage1.Pages(9).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption10
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l + s + l
.Top = t + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 493).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage10 = Me.MultiPage1.Pages(9).Controls.Add("Forms.Image.1")
With oImage10
.Name = "image10"
.Left = l + s + l
.Top = t
.Width = s
.Height = s
Worksheets("Data").Cells(FoundCell.Row, "RF").CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(9).Image10.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(9).Image10.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-11
If FoundCell.Offset(0, 494).Text > 0 Then
Dim CopyImage11 As shape
Dim oImage11 As image
Dim sTempFilename11 As String
sTempFilename11 = Environ("temp") & "\temp_" & "11" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
Dim lblCaption11 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption11 = MultiPage1.Pages(9).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption11
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l
.Top = t + s + h + h + s
.ForeColor = vbWhite
.BackColor = &H800000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 494).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage11 = MultiPage1.Pages(9).Controls.Add("Forms.Image.1")
With oImage11
.Name = "image11"
.Left = l
.Top = t + s + h + l
.Width = s
.Height = s
'Set CopyImage2 = Worksheets("Data").Cells(FoundCell.Offset, "QX")
Worksheets("Data").Cells(FoundCell.Row, "RG").CopyPicture xlScreen, xlPicture
' CopyImage2.CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(9).image11.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(9).image11.Picture.Visible = True
Me.Repaint
End With
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
'Picture-12
If FoundCell.Offset(0, 495).Text > 0 Then
Dim CopyImage12 As shape
Dim oImage12 As image
Dim sTempFilename12 As String
sTempFilename12 = Environ("temp") & "\temp_" & "12" & Format(Now, "yy-mm-dd_hh-mm-ss") & "*.gif; *.jpg; *.jpeg; *.gif;*.jpe,*.jfif;*.jpe"
Dim lblCaption12 As MSForms.Label
On Error GoTo Err_Clr
Set lblCaption12 = MultiPage1.Pages(9).Controls.Add("Forms.label.1", "myLabelCaption")
With lblCaption12
.Font.Name = "Arial Black"
.Font.Size = 14
.TextAlign = fmTextAlignCenter
.Width = s
.Height = h
.Left = l + s + l
.Top = t + s + h + h + s
.ForeColor = vbWhite
.BackColor = &H1200000
.WordWrap = False
.AutoSize = False
.Enabled = True
.Caption = FoundCell.Offset(0, 495).Value
Me.Repaint
End With
'Add and set the properties for an image control on the second page of the multipage control
Set oImage12 = MultiPage1.Pages(9).Controls.Add("Forms.Image.1")
With oImage12
.Name = "image12"
.Left = l + s + l
.Top = t + s + h + l
.Width = s
.Height = s
'Set CopyImage2 = Worksheets("Data").Cells(FoundCell.Offset, "QX")
Worksheets("Data").Cells(FoundCell.Row, "RD").CopyPicture xlScreen, xlPicture
' CopyImage2.CopyPicture xlScreen, xlPicture
Set MultiPage1.Pages(9).Image12.Picture = PastePicture
.PictureSizeMode = fmPictureSizeModeStretch
MultiPage1.Pages(9).Image12.Picture.Visible = True
Me.Repaint
End With
ActiveWindow.SmallScroll down:=1
ActiveWindow.SmallScroll up:=1
Application.ScreenUpdating = True
Application.EnableEvents = True
Else: Exit Sub
End If
Call ClearClipboard
'==============================================================================================
DoEvents
Me.Repaint
DoEvents
Application.ScreenUpdating = True
ActiveWindow.SmallScroll down:=1
ActiveWindow.SmallScroll up:=1
Err_Clr:
If Err <> 0 Then
Err.Clear
Resume Next
End If
End If
End With
End If
End Sub
Public Sub MultiPage1_Change()
DoEvents
Me.Repaint
DoEvents
ActiveWindow.SmallScroll down:=1
ActiveWindow.SmallScroll up:=1
End Sub
---------------------------------------
Public Function ClearClipboard()
OpenClipboard (0&)
EmptyClipboard
CloseClipboard
End Function
---------------------------------------
'Private Sub Image1_Click()
' If MultiPage1.Pages(7).imagecontrol("image1") = "" Then
'Set oImage = Me.MultiPage1.Pages(7).Controls.Add("Forms.Image.1")
'With oImage
' .Name = "image1"
' .Left = l
' .Top = t
'.Width = s
'.Height = s
'Set MultiPage1.Pages(7).image1.Picture = PastePicture
'.PictureSizeMode = fmPictureSizeModeStretch
'Me.Repaint
'Else:
' End If
'End Sub