xainthowell
New Member
- Joined
- Mar 3, 2023
- Messages
- 24
- Office Version
- 2013
- Platform
- Windows
Can someone help me with this code. Thanks
VBA Code:
Dim LastRow As Long
Dim PicPath As String
Dim sb As Worksheet
Set sb = ThisWorkbook.Sheets("Data")
LastRow = Application.WorksheetFunction.CountA(sb.Range("AK:AK")) + 1
namepic = Sheet2.Range("B" & LastRow).Value
SavePicture imgPhoto.Picture, ThisWorkbook.Path & "\" & namepic & ".jpg"
PicPath = ThisWorkbook.Path & "\" & namepic & ".jpg"
Sheet2.Cells(LastRow, "AK").Value = PicPath
form_SSEN.xlsb | |||
---|---|---|---|
B | |||
1 | FIRSTNAME | ||
2 | SHERWIN | ||
3 | CLAIRE | ||
Data |
form_SSEN.xlsb | |||
---|---|---|---|
AK | |||
1 | PHOTO | ||
2 | E:\SSEN Excel VBA Project\.jpg | ||
3 | E:\SSEN Excel VBA Project\SHERWIN.jpg | ||
4 | E:\SSEN Excel VBA Project\.jpg | ||
Data |