LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default help please (VBA to insert images)

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to insert images into unlocked cells martin Excel Discussion (Misc queries) 1 December 15th 08 10:51 PM
Insert Images Using Conditional Format (Many) Mike Garcia Excel Discussion (Misc queries) 4 October 4th 07 03:25 PM
insert images in a protected worksheet kub Excel Worksheet Functions 10 July 28th 07 11:31 AM
I want glitter images to insert rita New Users to Excel 1 February 27th 06 10:00 PM
VBA code to insert images in excel sheet Riya Excel Programming 2 October 29th 03 12:22 PM


All times are GMT +1. The time now is 05:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"