I'm pretty new to Macros and userforms
I would like to add a picture in a cell (That is loaded from a userform), if possibly re size it so all the pictures are more or less (In Kb) the same size and that they also look uniform (In the cells / Range)
Then also save an original copy of the picture in a folder so I can reference / call back the original picture in full quality, on a later stage.
This is what i have so far:
Private Sub CommandButton4_Click()
Dim fileToOpen As Variant
Sheets("Backup").Select
fileToOpen = Application _
.GetOpenFilename("All Picture Files (*.jpg;*.gif;*.bmp;*.tif),*.jpg;*.gif;*.bmp;*.tif")
If fileToOpen <> False Then
Me.Image1.Picture = LoadPicture(fileToOpen)
Image1.PictureSizeMode = fmPictureSizeModeStretch
Me.Repaint
Image1.Visible = True
Set pic = ActiveSheet.Shapes.AddPicture(Filename:=fileToOpen, _
LinkToFile:=msoFalse, SaveWithDocument:=msoCTrue, Left:=0, Top:=0, Width:=-1, Height:=-1)
End If
End Sub
Any assistance will be greatly appriciated
I would like to add a picture in a cell (That is loaded from a userform), if possibly re size it so all the pictures are more or less (In Kb) the same size and that they also look uniform (In the cells / Range)
Then also save an original copy of the picture in a folder so I can reference / call back the original picture in full quality, on a later stage.
This is what i have so far:
Private Sub CommandButton4_Click()
Dim fileToOpen As Variant
Sheets("Backup").Select
fileToOpen = Application _
.GetOpenFilename("All Picture Files (*.jpg;*.gif;*.bmp;*.tif),*.jpg;*.gif;*.bmp;*.tif")
If fileToOpen <> False Then
Me.Image1.Picture = LoadPicture(fileToOpen)
Image1.PictureSizeMode = fmPictureSizeModeStretch
Me.Repaint
Image1.Visible = True
Set pic = ActiveSheet.Shapes.AddPicture(Filename:=fileToOpen, _
LinkToFile:=msoFalse, SaveWithDocument:=msoCTrue, Left:=0, Top:=0, Width:=-1, Height:=-1)
End If
End Sub
Any assistance will be greatly appriciated