[xpost][/xpost]
Hi Everybody
Hope you and yours are Ok at this awful time....
I Need your expertise to solve a small Pickle ....
I Need a VBA Code. I'm doing a work diary, where I add every day 3 to 9 PICS of works being done on my construction site.
I want to insert 3 images from a specific folder, r in one go!
When I use the code it should open the Folder automatically (Like ThisWorkbook.Path) the option "Application.GetOpenFilename" doesn't help me because I have to search every time the path of the folder. As my Pics and my sheet are in the same folder (everyday has different Pics and a copy of the same excel file), it would help to open it from there....
I have created a Botton, when I push it, it should:
Insert image 1, image 2 and image 3 (JPG, BMP, GIF, TIF, etc...) in different columns. The 3 Pics should be selected in one selection (in the Folder) and being automatically copied to following cells. Not always there are 3 images to import, sometimes I just import 1 or 2. The import Cells are:
Image 1 to Cell L82:P88
Image 2 to Cell Q82:U88
Image 3 to Cell V82:Z88
They should adjust Left/Top and in Height and Width in the Number of rows (3 Columns x 7 Lines)
Something like this:
1st Line
(PIC 1 = 3 Columns x 7 Lines) | (PIC 2 = 3 Columns x 7 Lines) | (PIC 3 = 3 Columns x 7 Lines) End
2nd Line
(PIC 4 = 3 Columns x 7 Lines) | (PIC 5 = 3 Columns x 7 Lines) | (PIC 6 = 3 Columns x 7 Lines) End
and so on... (don't worry I can easily copy and make a new Bottom for each Line....
I'm using some codes I found on the Net but can only get 1 image every-time in to the sheet... I don't want to have 1 Pic 1 Button.
Here is where I am:
Sub Photo1()
Dim fNameAndPath As Variant
Dim img As Picture
fNameAndPath = 'Should be This WorkBook
'Resize Picture to fit in the range....
.Left = ActiveSheet.Range("L82").Left
.Top = ActiveSheet.Range("L82").Top
.Width = ActiveSheet.Range("L82:P82").Width
.Height = ActiveSheet.Range("L82:L88").Height
.Placement = 1
.PrintObject = True
End With
'Now I want to add the 2 other Pics but I don't know how!
.Left = ActiveSheet.Range("Q82").Left
.Top = ActiveSheet.Range("Q82").Top
.Width = ActiveSheet.Range("Q82:U82").Width
.Height = ActiveSheet.Range("Q82:Q88").Height
.Placement = 1
.PrintObject = True
.Left = ActiveSheet.Range("V82").Left
.Top = ActiveSheet.Range("V82").Top
.Width = ActiveSheet.Range("V82:Z82").Width
.Height = ActiveSheet.Range("V82:V88").Height
.Placement = 1
.PrintObject = True
End Sub
Display More
Could you please help me. Thank you in advance for your help.
I Have Office 2010. Added a Pic with what I need. Button is on the Upright corner of the Pic....