hibernian3
New Member
- Joined
- May 2, 2019
- Messages
- 7
Hi All,
I am adding pictures into excel VBA but can't seem to figure out how to adjust the brightness, contrast and sharpness. Below code works fine except for the brightness adjustment...
I am adding pictures into excel VBA but can't seem to figure out how to adjust the brightness, contrast and sharpness. Below code works fine except for the brightness adjustment...
VBA Code:
Sub Photoload()
Dim FldrPicker As FileDialog
Dim myFolder As String
Dim pic As Picture
Set FldrPicker = Application.FileDialog(msoFileDialogFolderPicker)
With FldrPicker
.Title = "Select A Target Folder"
.AllowMultiSelect = False
If .Show <> -1 Then Exit Sub 'Check if user clicked cancel button
myFolder = .SelectedItems(1) & "\"
End With
Set pic = ActiveSheet.Pictures.Insert(myFolder & "/hole1.png")
With pic
.Height = 440
.Top = Range("H18").Top + (Range("H18").Height - .Height) / 2
.Left = Range("H18").Left + (Range("H18").Width - .Width) / 2
.PictureFormat.IncrementBrightness 0.3
End With
pic.ShapeRange.SoftEdge.Radius = 8
End Sub