HI Respected All!
here is the code which i am using for getting pics in excel which is working best....
(while special thanks to "Momentman" the great man for helping in preparing this code)
Private Sub Worksheet_Calculate()
Static OldVal As Variant
On Error GoTo errhandler
If Range("j7").Value <> OldVal Then
Image1.Picture = LoadPicture("D:\School Record\General School Record\Students data and admission record\Picture record\" & Range("j7").Value & ".jpg")
OldVal = Range("j7").Value
End If
errhandler:
If Err.Number = 53 Then
Image1.Picture = LoadPicture("")
End If
End Sub
Now i made some amendments for getting some different results i know this forum has unlimited excel experts will any one help me by checking my following code which is giving (error.53) file not found. thanks
Private Sub Worksheet_Calculate()
Static OldVal As Variant
If Range("c11").Value <> OldVal Then
Image2.Picture = LoadPicture("D:\School Record\General School Record\Students data and admission record\Picture record\" & Range("c11").Value & ".jpg")
OldVal = Range("c11").Value
ElseIf Err.Number = 53 Then
Image2.Picture = LoadPicture("D:\School Record\General School Record\Students data and admission record\Picture record\0.jpg")
End If
End Sub
**// 0 is an white blank image//**
here is the code which i am using for getting pics in excel which is working best....
(while special thanks to "Momentman" the great man for helping in preparing this code)
Private Sub Worksheet_Calculate()
Static OldVal As Variant
On Error GoTo errhandler
If Range("j7").Value <> OldVal Then
Image1.Picture = LoadPicture("D:\School Record\General School Record\Students data and admission record\Picture record\" & Range("j7").Value & ".jpg")
OldVal = Range("j7").Value
End If
errhandler:
If Err.Number = 53 Then
Image1.Picture = LoadPicture("")
End If
End Sub
Now i made some amendments for getting some different results i know this forum has unlimited excel experts will any one help me by checking my following code which is giving (error.53) file not found. thanks
Private Sub Worksheet_Calculate()
Static OldVal As Variant
If Range("c11").Value <> OldVal Then
Image2.Picture = LoadPicture("D:\School Record\General School Record\Students data and admission record\Picture record\" & Range("c11").Value & ".jpg")
OldVal = Range("c11").Value
ElseIf Err.Number = 53 Then
Image2.Picture = LoadPicture("D:\School Record\General School Record\Students data and admission record\Picture record\0.jpg")
End If
End Sub
**// 0 is an white blank image//**
Last edited: