Hi, I'm working a code which gets an image from my folder and shows it on the userform. However, I would like to increase the size of the image so it can be seen better.
Below is the code to get the image. However, I am not sure how to increase the size as my VBA knowledge is very limited. Any help would be appreciated.
Private Sub btnShowDrugImage_Click()
Dim fPath As String
Dim fName As String
Dim RowCount As Range
Dim RowCell As Integer
Dim ColumnCell As Integer
fPath = "C:\drugimages\"
fName = ""
Set RowCount = Worksheets("Sheet2").Range("A1:A100000").Find(cboDrugImageMedication.Value, lookat:=xlPart)
If Not RowCount Is Nothing Then
RowCell = RowCount.Row
ColumnCell = RowCount.Column
fName = Worksheets("Sheet2").Cells(RowCell, ColumnCell + 1).Value
fPath = fPath & fName & ".jpg"
imgDrugImage.Picture = LoadPicture(fPath)
MsgBox "Here is your image"
imgDrugImage.Picture = LoadPicture("")
End If
End Sub
Bookmarks