VBA Code for create object on excel sheet to attached multipal pictures file on another excelsheet

doit_2729

New Member
Joined
Jun 15, 2014
Messages
2
Hello Everyone,

I am not good at VBA coding, i would be grateful if someone would help me.

I would like to create a button for attachment in excel sheet from where i can attached multiple pictures file which will paste on second sheet or " create automatically pictures tab sheet including pictures.

Thanking youVB
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

kumarapush123

Board Regular
Joined
Jan 17, 2014
Messages
59
The code below will attach File into excel sheet. You can put this code in a loop and replace the "Image_File_Path" with actual file name.

Code:
    Thisworkbook.sheets(2).OLEObjects.Add(Filename:= _
        "Image_File_Path", Link:= _
        False, DisplayAsIcon:=True, IconFileName:= _
        "C:\Program Files\Internet Explorer\iexplore.exe", IconIndex:=0, IconLabel _
        :="Image_File_Path").Select
 

doit_2729

New Member
Joined
Jun 15, 2014
Messages
2
The code below will attach File into excel sheet. You can put this code in a loop and replace the "Image_File_Path" with actual file name.

Code:
    Thisworkbook.sheets(2).OLEObjects.Add(Filename:= _
        "Image_File_Path", Link:= _
        False, DisplayAsIcon:=True, IconFileName:= _
        "C:\Program Files\Internet Explorer\iexplore.exe", IconIndex:=0, IconLabel _
        :="Image_File_Path").Select

Thanks Kumarapush
I dont this is not working for me..either i am doing wrong or i don't know how to do.
i would appreciate if you let me know how to setup

thanks
 

kumarapush123

Board Regular
Joined
Jan 17, 2014
Messages
59
Upload or mail a Sample Excel file with List of Image Filenames along with its complete path.
I will include a macro to that Excel - to automatically attach those image files to sheet2 through a macro.
 

Watch MrExcel Video

Forum statistics

Threads
1,099,333
Messages
5,467,992
Members
406,562
Latest member
Isbenji

This Week's Hot Topics

Top