+ Reply to Thread
Results 1 to 13 of 13

vba: renaming images & paste to userform

  1. #1
    Registered User
    Join Date
    06-12-2014
    Location
    Makati Philippines
    MS-Off Ver
    MS OFFICE 2010
    Posts
    58

    vba: renaming images & paste to userform

    Hi All,

    Needs assistance in Renaming an image inside a sheet so that i can let the code call it and paste in my project.

    Please see the attached file.

    in the teamform, Image1 box, that's where the image should show in each team. Different logo per team.
    Attached Files Attached Files
    Last edited by saikong051; 08-28-2014 at 12:09 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: vba: renaming images

    Maybe:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    06-12-2014
    Location
    Makati Philippines
    MS-Off Ver
    MS OFFICE 2010
    Posts
    58

    Re: vba: renaming images

    Hi xladept,

    may i know where to put that code?

    so sorry, i'm still not that good when it comes to coding.

  4. #4
    Registered User
    Join Date
    06-12-2014
    Location
    Makati Philippines
    MS-Off Ver
    MS OFFICE 2010
    Posts
    58

    Re: vba: renaming images

    and how can make sure that the picture or Logo of the TEAM name that's showing in the form is also showing in the Image1 box?

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: vba: renaming images

    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name

  6. #6
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: vba: renaming images

    Hi saikong051 and Orrin,

    Try the following two Macros:
    a. The first one renames the Image on the Active Sheet to 'PictureTeamLogo'.
    b. The second opens up the UserForm for the Active Sheet and inserts the image (details in the code).

    Please Login or Register  to view this content.
    Lewis

  7. #7
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: vba: renaming images

    Hi Saikong,

    You wanted to name the image - did you run my code?

    @Lewis - Thanks for that, I guess we interpreted the request differently - well as long as no dynamic requirements evolve

  8. #8
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: vba: renaming images

    Saikong
    why a new thread ? you let the first http://www.excelforum.com/excel-prog...r-picture.html practically unsolved,
    you could manually rename images
    Clic on image, change name on top left field
    Last edited by patel45; 08-20-2014 at 05:41 AM.
    If solved remember to mark Thread as solved

  9. #9
    Registered User
    Join Date
    06-12-2014
    Location
    Makati Philippines
    MS-Off Ver
    MS OFFICE 2010
    Posts
    58

    Re: vba: renaming images

    Hi All,
    Sorry just got back from long vacation leave.

    xladept: i've tried your code.. i think it renamed the picture but when i try to use the code where it will paste the picture in a userform, it does not work.

    LJMetzger: i'll try to understand your code first then try it. i'll get back once i have a result.

    patel45: i don't see that Change name tool in my excel. I'm using Excel 2010. and sorry, this one has a different file / project that's why i created a new thread.

  10. #10
    Registered User
    Join Date
    06-12-2014
    Location
    Makati Philippines
    MS-Off Ver
    MS OFFICE 2010
    Posts
    58

    Re: vba: renaming images & paste to userform

    if someone wants to view the whole file. please pm me your email address.. i'll forward it to you.. i can't attach the file here since it has more bytes than the allowed size that can be posted.

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: vba: renaming images & paste to userform

    Hi saikong,

    We (I) often use the dropbox to convey the larger files. Thanks for the rep!

  12. #12
    Registered User
    Join Date
    06-12-2014
    Location
    Makati Philippines
    MS-Off Ver
    MS OFFICE 2010
    Posts
    58

    Re: vba: renaming images & paste to userform

    Hi xladept,

    You're welcome. if it's helpful and i know that all these can help me in my current / future project, i always give rep points. Thanks to all of the efforts from you and the others.

    by the way, we are not allowed to have zip / dropbox here in the office.. i'll try to send it in my personal email and zip it in my laptop.

  13. #13
    Registered User
    Join Date
    06-12-2014
    Location
    Makati Philippines
    MS-Off Ver
    MS OFFICE 2010
    Posts
    58

    Re: vba: renaming images & paste to userform

    Hi All, Hi patel-- i was able to find that rename part for images.. hehe Sorry took me a long time.. i was able to finish my project.. it now shows the picture in the image1 form..


    used this code.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 01-01-2014, 04:36 PM
  2. Replies: 4
    Last Post: 12-11-2013, 04:13 AM
  3. Replies: 2
    Last Post: 06-18-2013, 12:15 PM
  4. Images Batch Export with renaming?
    By jayq in forum Excel General
    Replies: 0
    Last Post: 08-16-2012, 07:22 AM
  5. Renaming JPG images
    By treva26 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2007, 09:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1