Sub Lithology()
Dim xRow&, icolorp&, dblHeightp#, dblWidthp#, icolora&, dblHeighta#, dblWidtha#, strText$, shp As Shape, ws As Worksheet, xscalep#, yscalep#, xtopp#, xscalea#, yscalea#, xtopa
'Application.ScreenUpdating = False
Sheets("Sheet1").Select
Set ws = ActiveSheet
For xRow = 2 To 100
dblHeightp = Cells(xRow, 1).Value
dblWidthp = Cells(xRow, 2).Value
icolorp = Cells(xRow, 3).Value
xtopp = Cells(xRow, 4).Value
xscalep = Cells(xRow, 5).Value
yscalep = Cells(xRow, 6).Value
dblHeighta = Cells(xRow, 23).Value
dblWidtha = Cells(xRow, 24).Value
icolora = Cells(xRow, 25).Value
xtopa = Cells(xRow, 26).Value
xscalea = Cells(xRow, 27).Value
yscalea = Cells(xRow, 28).Value
Set shp = ws.Shapes.AddShape(Type:=msoShapeRectangle, Left:=10, Top:=xtopp, Width:=dblWidthp, Height:=dblHeightp)
Select Case icolorp
Case 1
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Marl.png"
shp.Fill.TextureHorizontalScale = xscalep
shp.Fill.TextureVerticalScale = xscalep
shp.Line.Visible = msoFalse
Case 2
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Shale.png"
shp.Fill.TextureHorizontalScale = xscalep
shp.Fill.TextureVerticalScale = xscalep
shp.Line.Visible = msoFalse
Case 3
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Dolomite.png"
shp.Fill.TextureHorizontalScale = xscalep
shp.Fill.TextureVerticalScale = xscalep
shp.Line.Visible = msoFalse
Case 4
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Anhydrite.png"
shp.Fill.TextureHorizontalScale = xscalep
shp.Fill.TextureVerticalScale = xscalep
shp.Line.Visible = msoFalse
Case 5
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\limestone.png"
shp.Fill.TextureHorizontalScale = xscalep
shp.Fill.TextureVerticalScale = xscalep
shp.Line.Visible = msoFalse
Case 6
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\sandstone.png"
shp.Fill.TextureHorizontalScale = xscalep
shp.Fill.TextureVerticalScale = xscalep
shp.Line.Visible = msoFalse
End Select
Set shp = ws.Shapes.AddShape(Type:=msoShapeRectangle, Left:=100, Top:=xtopa, Width:=dblWidtha, Height:=dblHeighta)
Select Case icolora
Case 1
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Marl.png"
shp.Fill.TextureHorizontalScale = xscalea
shp.Fill.TextureVerticalScale = xscalea
shp.Line.Visible = msoFalse
Case 2
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Shale.png"
shp.Fill.TextureHorizontalScale = xscalea
shp.Fill.TextureVerticalScale = xscalea
shp.Line.Visible = msoFalse
Case 3
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Dolomite.png"
shp.Fill.TextureHorizontalScale = xscalea
shp.Fill.TextureVerticalScale = xscalea
shp.Line.Visible = msoFalse
Case 4
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\Anhydrite.png"
shp.Fill.TextureHorizontalScale = xscalea
shp.Fill.TextureVerticalScale = xscalea
shp.Line.Visible = msoFalse
Case 5
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\limestone.png"
shp.Fill.TextureHorizontalScale = xscalea
shp.Fill.TextureVerticalScale = xscalea
shp.Line.Visible = msoFalse
Case 6
shp.Fill.UserPicture "C:\Users\bedfx0\Documents\sandstone.png"
shp.Fill.TextureHorizontalScale = xscalea
shp.Fill.TextureVerticalScale = xscalea
shp.Line.Visible = msoFalse
End Select
Next xRow
Set ws = Nothing
'Application.ScreenUpdating = True
End Sub