Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub SquirrelDraw()
- Dim i As Integer
- Dim sFilename As String
- Dim bcontinue As Boolean
- Dim spath As String
- spath = "X:\Josh_Placards\Pic_Dump\J5\rack_1"
- i = 1
- bcontinue = True
- While bcontinue = True
- sFilename = Worksheets(2).Cells(i, 1).Value
- Worksheets(2).Cells(i, 5) = sFilename
- If sFilename = "" Then
- bcontinue = False
- Else
- Cells(i, 2).Select
- ActiveSheet.Pictures.Insert(spath + sFilename).Select
- Selection.ShapeRange.LockAspectRatio = msoFalse
- Selection.ShapeRange.Height = 141.75
- Selection.ShapeRange.Width = 141.75
- i = i + 1
- End If
- Wend
- 'indicates loop is finished
- Worksheets(2).Cells(4, 4) = "success"
- End Sub
- 'just tests that images can be loaded based on a parameter. Works.
- Sub imagetest()
- ActiveSheet.Pictures.Insert ("X:\Josh_Placards\Pic_Dump\J5\rack_1\" & Range("e16").Select & ".jpg")
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement