+ Reply to Thread
Results 1 to 5 of 5

capture the name of an image in a command button

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    capture the name of an image in a command button

    Hi.
    Whenever initialized the userform, this commandbutton appears with a different picture. I would like to read the original name of this picture.

    Ex: The picture of the commandbutton is a file called "Bird.bmp" then I want to store the name of orange on a string.

    Would have like?
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: capture the name of an image in a command button

    Hi.

    anyone have any idea?
    Thank you!

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: capture the name of an image in a command button

    Your question does not really make sense, it maybe a language thing.

    could you use the .Tag property to store the file name. You would need to enter this manually as the Picture property only contains the image details and not the source file name.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: capture the name of an image in a command button

    Hi Andy

    I'll try to explain.
    imagine that in a commandbutton, has an image.
    this button, you will display (see) several pictures at random.

    is it possible to capture (catch), the name of this picture?

    thank you!!

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: capture the name of an image in a command button

    No, as I said previously the source file is not stored automatically. You would need to store that information somewhere.

+ 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. Create a command button with code with a command button
    By jakara in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2013, 01:28 PM
  2. [SOLVED] How to capture command button label text?
    By cadnauseum in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-09-2012, 02:51 PM
  3. [SOLVED] vba code, command bar, command bar button, one button works but not two
    By amazingg64 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2012, 09:55 AM
  4. Replies: 1
    Last Post: 09-17-2007, 09:57 PM
  5. Replies: 0
    Last Post: 11-03-2005, 11:00 AM

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