thanks for your reply bro
i have more than 40 sheets in my workbook and it increases by feeding additional estimates
after 15th sheet each sheet is named with the container nos and it goes on till n th sheet for eg texu1234567/crxu23156478 etc
for all these container we have damage photo which is stored in c:/photos
now macro has to search for file name ( which is sheet name itself) and select all photos
after these i have the code which is running as
VBA Code:
Dim PicList() As Variant
' Dim PicFormat As String
' Dim rng As Range
' Dim sShape As Shape
'
' Sheets("test").Select
' Range("a1").Select
' ActiveSheet.DrawingObjects.Select
' Selection.Delete
' Range("A1").Select
' Cells.Select
' Selection.ColumnWidth = 36.41
' Selection.RowHeight = 276
' Range("a1").Select
'
' Let xColIndex = n
' Let xRowIndex = m
' On Error Resume Next
' PicList = Application.GetOpenFilename(PicFormat, MultiSelect:=True)
' m = 1
' n = 1
'
' If IsArray(PicList) Then
' For lLoop = LBound(PicList) To UBound(PicList)
' Set rng = Cells(m, n)
' Set sShape = ActiveSheet.Shapes.AddPicture(PicList(lLoop), msoFalse, msoCTrue, rng.Left, rng.Top, rng.Width, rng.Height)
' n = n + 1
' If n = 6 Then
' m = m + 1
' n = 1
' End If
' Next
' End If
' Range("a1").Select
' Columns("A:e").ColumnWidth = 37
' Rows("1:40").RowHeight = 280
' Range("a1").Select
' ActiveSheet.DrawingObjects.Select
' Selection.Copy
' Sheets(p).Select
' Range("A23").Select
' ActiveSheet.Paste
' Range("A1").Select
'
'Next p
we dont want getopenfile application ,macro should search file as sheet name and execute till last sheet
will appreciate your kind response
rgds