Now I have this.
For Each Cell In .Range("M2:M" & .Cells(.Rows.Count, 13).End(xlUp).Row)
For Each pic In Array(".gif", ".jpg")
If Dir(Path & Cell & pic) <> "" Then
With .Pictures.Insert(Path & Cell & pic)
.ShapeRange.LockAspectRatio = msoFalse...
For each is not the problem, how to do it with the pics instead of cells,I don't want to use the blocks for every extention.
An example of a for each in a function doen't help at aal.
This is the complete code.
I want to expand this code so I can use different extensions.
Jpg, Gif,Png
Any body an idee?
Sub belle()
Dim Cell As Range, Path As String
Path = "C:\Test\"
With Sheets("Sheet1")
For Each Cell In .Range("M2:M" & .Cells(.Rows.Count, 13).End(xlUp).Row)
If...
How can i change this code so it works for jpg and gif?
If Dir(Path & Cell & ".jpg") <> "" Then
With .Pictures.Insert(Path & Cell & ".jpg")
Thanks in advance
Try this.
This will delete all rows below the last value in column B
Sub Belle()
Dim lastRow As Long
Dim row As Long
Dim temp As String
' insert your sheet name here
With ThisWorkbook.Worksheets("Delete.Rows")
lastRow = .Cells(.Rows.Count, "A").End(xlUp).row
' you can change the starting...
Problem 1:
In the properties set tabstop on false and locked on true where applicable.
Problem 2:
Use a real table instead of Defined Name Range for your mastersheet then the Formulas will be added automaticly.