A
alenhart
through my searching of this and other boards, I came up with the
following code that would pick up the file name in E4 and insert the
image in E5 and then loop through the worksheet. It works perfectly the
first time, but then it seems to get stuck and repeat itself over and
over with out end. obviously I am missing something.
please help!
here is the code:
Sub InsertImages()
Dim i As Integer
Dim sFilename As String
Dim bcontinue As Boolean
Dim spath As String
spath = "http://cmspro/stellent/idcplg/webdav/Contribution
Folders/Exhibitions_Public/Fast Forward/FFImages/"
bcontinue = True
While bcontinue
sFilename = Worksheets(2).Cells(4, 5).Value
If sFilename = "" Then
bcontinue = False
Else
Cells(4, 6).Select
ActiveSheet.Pictures.Insert(spath + sFilename).Select
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 85
i = i + 1
End If
Wend
End Sub
following code that would pick up the file name in E4 and insert the
image in E5 and then loop through the worksheet. It works perfectly the
first time, but then it seems to get stuck and repeat itself over and
over with out end. obviously I am missing something.
please help!
here is the code:
Sub InsertImages()
Dim i As Integer
Dim sFilename As String
Dim bcontinue As Boolean
Dim spath As String
spath = "http://cmspro/stellent/idcplg/webdav/Contribution
Folders/Exhibitions_Public/Fast Forward/FFImages/"
bcontinue = True
While bcontinue
sFilename = Worksheets(2).Cells(4, 5).Value
If sFilename = "" Then
bcontinue = False
Else
Cells(4, 6).Select
ActiveSheet.Pictures.Insert(spath + sFilename).Select
Selection.ShapeRange.LockAspectRatio = msoTrue
Selection.ShapeRange.Height = 85
i = i + 1
End If
Wend
End Sub