+ Reply to Thread
Results 1 to 13 of 13

Assign a value to an image

  1. #1
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Assign a value to an image

    I'm relatively new to excel programming.

    What I want to do:

    Assign a value to an image that will populate a value within the same row.

    http://farm5.static.flickr.com/4046/...9804577d59.jpg

    There's a link to a brief image of a part of my file.

    As you can see I have 5 columns (Paid, Trade, Customer Extra, Not Paid, Self Promotion). Right now I am manually entering in "1's" in each of those columns to correspond to the image shown on the left.

    Is there a way to assign a macro to each image so that it will manually populate the proper column?
    Last edited by Dissonant; 04-19-2010 at 10:41 AM. Reason: Solved

  2. #2
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Assign a value to an image

    http://www.excelforum.com/excel-prog...n-a-macro.html

    I noticed this thread, that has similar applications. After reading that, i'm thinking the easiest solution could be to create a macro that would populate the cell that the image is pasted into with the image's alt text. Fom there it's an easy matter of populating the proper column with "1's" Although I'm not really sure where to start with something like that.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Assign a value to an image

    Hello Dissonant,

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!

    Cross posted here: http://www.mrexcel.com/forum/showthread.php?t=461839

  4. #4
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Assign a value to an image

    Sorry, I just saw the Forum Rules post at the top of this forum that only had 3 specifications. I thought Double posting only applied to posting multiple threads on this forum.

    I hadn't gotten any nibbles yet so I figured I'd try my luck on another forum as well.

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Assign a value to an image

    Hello Dissonant,

    No problem. Do want the cell to be filled in when the user clicks the image?

  6. #6
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Assign a value to an image

    Not when a user clicks, I just want the cell to be automatically populated, or if nothing else be populated when I run the macro.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Assign a value to an image

    Hello Dissonant,

    It would be easier to supply you with the needed code if your workbook were available. Can you post your workbook?

  8. #8
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Assign a value to an image

    http://www.mixedmediaoutdoor.com/Testing.zip

    There's a link. Upload feature was timing out for me.

    It's columns E-I that I'd like to automate, so each time I move the pictures I don't have to manually assign values under paid, trade, extra, not paid and self promo.

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Assign a value to an image

    Hello Dissonant,

    I got the file and open it. I don't understand how the columns would be populated using the pictures. Can you explain in more details what you want to happen?

  10. #10
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Assign a value to an image

    Column B, the column of pictures is pasted from another sheet. When I paste the pictures into that sheet, I would like excel to automatically register what kind of advertising it is(paid, trade, extra, not paid, promo). I know I'll have to assign that value to the picture, whether it's in the alt text or elsewhere, but I would like to only have to do that once as opposed to everytime things move.

  11. #11
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Assign a value to an image

    Really the bottom line is, I'm trying to find some kind of function or macro that will return the alt text of an image in the same row. Unless the wizards here can think of an easier way.

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Assign a value to an image

    Hello Dissonant,

    I have created 2 macros for you. One that assigns the ad type based on the number one in column "E:I" and a UDF to return the ad type to a cell using the picture's name. I already ran the SetAdType macro to assign the ad type to alternative text and added the UDF in column "D" so you can see the ad type.

    Like you, I can't upload anything to the Forum. If you send your me email address, I'll send the workbook to you. My email is LeithRoss@gmail.com

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    04-15-2010
    Location
    Chicago
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Assign a value to an image

    Please Login or Register  to view this content.
    Here is the final solution from Leith that picks up a picture in the same row and returns it's Alt Text.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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

X vBulletin 4.1.8 Debug Information

  • Page Generation 0.07511 seconds
  • Memory Usage 9,170KB
  • Queries Executed 14 (?)
More Information
Template Usage (32):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (2)bbcode_code
  • (1)footer
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (13)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (4)navbar_noticebit
  • (6)option
  • (13)postbit_legacy
  • (13)postbit_onlinestatus
  • (13)postbit_wrapper
  • (4)showthread_bookmarksite
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper
  • (1)vbseo_linkbackmenu_entry 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (39):
  • ./vbseo.php
  • ./env.php
  • ./vbseo/includes/functions_vbseo.php
  • ./vbseo/includes/functions_vbseo_pre.php
  • ./vbseo/includes/functions_vbseo_url.php
  • ./vbseo/includes/functions_vbseo_createurl.php
  • ./vbseo/includes/functions_vbseo_db.php
  • ./vbseo/includes/functions_vbseo_vb.php
  • ./vbseo/includes/functions_vbseo_seo.php
  • ./vbseo/includes/functions_vbseo_misc.php
  • ./vbseo/includes/functions_vbseo_crr.php
  • ./vbseo/includes/functions_vbseo_cache.php
  • ./vbseo/includes/functions_vbseo_hook.php
  • ./vbseo/includes/functions_vbseo_startup.php
  • ./includes/config.php
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/functions.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/functions_cforum.php
  • ./includes/functions_facebook.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (47):
  • init_startup
  • friendlyurl_resolve_class
  • database_pre_fetch_array
  • database_post_fetch_array
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • fetch_musername
  • cache_templates
  • template_register_var
  • parse_templates
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • showthread_bookmarkbit
  • navbits
  • navbits_complete
  • showthread_complete


Search Engine Friendly URLs by vBSEO 3.6.0 RC 1