B
baha
I have a below code which,whenever I select a cell(which has a id
number of a person) and run the macro by"ctl+p" it promps userform
with a picture of the person.Now I want,whenever I enter a number and
press a enter button, insert a picture on the top left corner of the
same sheet without calling the user form.Those picture shout be change
everytime I enter the id,or it might be even scan from bar code.Is
that possible? Just for the referance my code is below.
Thanks for the help:
Private Sub UserForm_Initialize()
Dim TM As Double
Dim Prfx As String
Dim Prfxx As String
TM = ActiveCell.Value
Prfx = 6 - Len(Trim(TM))
Select Case Prfx
Case 5
Prfxx = "00000"
Case 4
Prfxx = "0000"
Case 3
Prfxx = "000"
Case 2
Prfxx = "00"
Case 1
Prfxx = "0"
Case 0
Prfxx = ""
End Select
On Error Resume Next
Image1.Picture = LoadPicture("J:\Reference\QT\Team Member Images\" &
Prfxx & TM & ".00.jpg")
End Sub
number of a person) and run the macro by"ctl+p" it promps userform
with a picture of the person.Now I want,whenever I enter a number and
press a enter button, insert a picture on the top left corner of the
same sheet without calling the user form.Those picture shout be change
everytime I enter the id,or it might be even scan from bar code.Is
that possible? Just for the referance my code is below.
Thanks for the help:
Private Sub UserForm_Initialize()
Dim TM As Double
Dim Prfx As String
Dim Prfxx As String
TM = ActiveCell.Value
Prfx = 6 - Len(Trim(TM))
Select Case Prfx
Case 5
Prfxx = "00000"
Case 4
Prfxx = "0000"
Case 3
Prfxx = "000"
Case 2
Prfxx = "00"
Case 1
Prfxx = "0"
Case 0
Prfxx = ""
End Select
On Error Resume Next
Image1.Picture = LoadPicture("J:\Reference\QT\Team Member Images\" &
Prfxx & TM & ".00.jpg")
End Sub