Put a loop for the code which insert pictures
Closed
hany
-
Jul 30, 2011 at 09:50 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 30, 2011 at 04:50 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 30, 2011 at 04:50 PM
Related:
- Put a loop for the code which insert pictures
- Battery reset code - Guide
- Samsung volume increase code - Guide
- Usa country code for whatsapp - Guide
- Cs 1.6 code - Guide
- How to insert photo in word for resume - Guide
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 30, 2011 at 04:50 PM
Jul 30, 2011 at 04:50 PM
You can try some thing like this
Sub Macro1() Dim lStartAt As Long Dim lEndAt As Long Dim iCount As Long Dim lCtr As Long lStartAt = 4 lEndAt = 22 For lCtr = lStartAt To lEndAt iCount = iCount + 1 Range ("B" & lCtr) 'need to have the loop to B(i+18) ActiveSheet.Pictures.Insert("C:\Users\user\Pictures\Acceptance\" & iCount & " (" & iCount & ").jpg").Select 'need to have loop for 1 (j+1).jpg Selection.ShapeRange.Height = 184.32 Selecion.Cut ActiveSheet.Pictures.Paste.Select Next End Sub