+ Reply to Thread
Results 1 to 27 of 27

Display shape data in a text box?

  1. #1
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Display shape data in a text box?

    hi

    Basically i have a cell linked to a shape which shows the count of the particular item within the shape, i also have a macro running to colour the shape according to the value range. Now what i need to do finally is to be able to click on the shape and get the description of the latest fault on that particular cell. I should probably explain this a bit more, i have a database with different faults on different locations, i then have a pivot table to get the total count of faults on each location and then finally i have the shapes linked to the cells showing the count of faults with conditional formatting.

    Having searched on the web, i found that we can actually have a text box appear once a cell is selected (only a data validation cell), this text box shows the input message that goes out to a user entering information in the cell.

    My idea is somewhere around the same lines, hence i think it is possible just dont know how to do that.

    If you need any more information just ask me n ill try to explain it a little bit more.

    Thanks
    Last edited by abz; 07-19-2010 at 05:40 AM.

  2. #2
    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: Display shape data in a text box?

    Hello abz,

    To provide you with an expedient answer, you should post your workbook. This will serve as a guide when writing the code to the formats, fonts, formulae, etc. If you have confidential information, you should create an expurgated copy for posting.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    hiya,

    sorry i should hav dun that in the first place, the attached file has the location table and the shapes next to the locations, the idea is that the shapes will then go on a geographical map for a geographic representation.

    The 'Update Colouring' button just runs a small macro to activate the conditional formatting macro. In sheet 2 i have the pivot table with the count of faults, and in sheet 4 i have the database.

    My thoughts were to have a macro/formula search for the latest fault on each location and input in the cell against each location. The shape then picks up that cell and displays it in a text box only when the shape is clicked on/selected.

    I hope this is a much better explanation

    Thanks

    Note: The file is a macro enabled Excel file.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Is there no one to out there to answer my query???????

    Regards,
    Abz

  5. #5
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    I am still waiting for some genius kind of solution to my problem!!

    Abz

  6. #6
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi Abz;

    I'm not positive that I can help, but I'll try.
    1) When would you like the macro that finds the latest fault to trigger?
    2) How would the macro determine what the latest fault is? I see no dates in the table.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  7. #7
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Hi Foxguy,

    I am glad someone atleast took the time to reply atleast.

    Firstly the macro will have to trigger when any of the shapes is clicked on, or selected by the user, so the shape the user clicks on is already linked to the cell with the number of faults, just need to display the lates fault in a separate textbox or a square/rectangle shape.

    Secondly yes i didn't realise that there were no dates in the table on sheet4, i have amended this and now it also includes date under the heading of CompDate, you can ignore the times in the column, no significance of it.

    Once again thanks a lot and i will be waiting for your reply, let me know if you need more info.

    Thanks,
    Abz
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Firstly the macro will have to trigger when any of the shapes is clicked on, or selected by the user, so the shape the user clicks on is already linked to the cell with the number of faults, just need to display the lates fault in a separate textbox or a square/rectangle shape.
    I don't use Excel 2007, but at least I can write the framework for what you want. Specifically, I'm not sure what you mean by showing the latest fault in a textbox. I should be able to put it into a shape (I hope - never tried it before, but at least I understand what you mean).
    Quite honestly I would do it differently. I would just have the latest fault in the cell right next to the shape. It would get updated automatically when a later fault was entered in sheet4 table. The user wouldn't have to click anything to see it.

    Once again thanks a lot and i will be waiting for your reply, let me know if you need more info.
    It may take a couple of days. It's 4 in the morning (and I have got to get to bed), and I will be gone most of tomorrow. I should be able to get to it tomorrow night though.

    1 question. I notice that the workbook you uploaded doesn't have any macros in it. Do you know how to edit macros? If not, I will write it differently.

  9. #9
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Foxguy,

    I do agree with your suggestion that a cell next to the shape would do the job and the user doesnt have to click on anything. That is something i suggested earlier that i would divide this task into 2 main tasks, first one the cell next to the location name would pick up the lastest fault from sheet 4 and display it, and the second bit would be that the text box picks up the cell and then only appears when the user clicks on the corresponding location shape.

    The problem of not having the text box is that the shape are going to be on a geographical map rather than being next to a cell where the latest fault is being displayed. I hope you understand what i am saying.

    I can give you a lead on a text box appearing and disappearing, i found this on the following link:

    http://www.contextures.com/xlDataVal12.html

    the code that is bieng used in there is as below:

    Please Login or Register  to view this content.

    you might be able to decipher this code and mend it, i couldn't do it personally cuz im not an expert on vba.



    Regarding not having macros in my workbook its becuase i accidentally saved it as a macro free workbook, i am attaching the new one.

    Just to mention i am using a code which is a worksheet change code and the button is merely just to go to a cell and edit it which in turn triggers the worksheet change code.

    I hope this explaination helps.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi abz;
    Sorry this has taken so long, we had a power failure here. We just got our power back. I was gone all day yesterday which is the only thing that kept me from going out of my mind.
    I happened to be just finishing my reply to you when the power went out, so now I have to start again.

    That is something i suggested earlier that i would divide this task into 2 main tasks, first one the cell next to the location name would pick up the lastest fault from sheet 4 and display it, and the second bit would be that the text box picks up the cell and then only appears when the user clicks on the corresponding location shape.
    So are you saying that you would like both? I'm working on a formula that will put it into the cell you want.

    The problem of not having the text box is that the shape are going to be on a geographical map rather than being next to a cell where the latest fault is being displayed. I hope you understand what i am saying.
    I have no idea what this means. I hope you mean that you want to move the shapes to another sheet that has a map on it. If not, then I have no idea whether you can move a shape with a text box attached.

    I can give you a lead on a text box appearing and disappearing, i found this on the following link:
    Thanks for the link. It puts another tool in my toolbox. They are pretty easy to do, so no problem there.

    Just to mention i am using a code which is a worksheet change code and the button is merely just to go to a cell and edit it which in turn triggers the worksheet change code.
    I cleaned up your code. You want to put the code for updating colors in a separate macro, so you can call it directly without having to artificially change something to get it done. Also, if you want to move the shapes to a different sheet, it could easily make it easier later on.
    Please Login or Register  to view this content.
    If I may make a suggestion:
    You can get rid of the button altogether, and have the shapes automatically updated by using this
    Please Login or Register  to view this content.
    That way the coloring gets updated whenever any cell changes on the sheet. (Delete CommandButton1_Click, and you can take it out of Worksheet_Change).

    I'm working right now on having the shape click put a text box next to it.
    Last edited by foxguy; 07-16-2010 at 05:24 PM.

  11. #11
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Hi Foxguy,


    Thanks for your help, just to let you know i used the code that i sent you earlier and have managed to manipulate it so when i click on a shape a textbox appears which shows me information from a specific cell. I am just working on it to make it a bit more presentable and once i have it finalised ill post it here just for your information and for others too.


    And the reason i did not use the worksheet change by value option is because once a user selects what he wants to see from the pivot table he then moves to the sheet where the map is and he doesnt actually change anything on the sheet where the map is, hence the colouring doesnt get updated.

    Another reason for not having it that way is that i have just recently added a userform on this which prompts the user to enter his own colouring range and then the macro uses that colouring range to update the colouring.

    Anyways i will be posting my own solution here very soon.

    Regards,
    Abz

  12. #12
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Foxguy,

    Kind of managed to make it a bit neat and readable, please see that attached sheet.
    It does what i want it to do to an extent, as when i click on a shape it shows me a text box with the corresponding text from a cell. I simply just assigned a macro to the shape to just select the cell that i want to link the shape to.
    The rest of the job is done by the worksheet selection change by value macro which is in sheet 1. now the problem with that is that is there is a any text/value in any cell on that sheet the text box will appear with that text showing inside it.

    The second problem is that the shape is using D9 as its target and whatever is in there it shows in the txtbox and cell D9 is acting as a variable as whatever cell in the sheet is select, that has some text in it, cell D9 will show that text and consequently the text box will show that too.

    The final problem is that i want the text box to show 2 values inside it, 1 would be the cell selected and the second would be the adjacent cell in column C. it is just stuck on one cell in column C and showing that for all selections.

    I hope my explaination isn't too confusing, let me know if it needs more exlpaining.

    Regards,
    Abz
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi abz;

    I've been struggling to find a formula that would extract the latest fault. I even asked for help. I just can't do it in 1 formula to my satisfaction. It needs an additional column.

    These are the 3 best solutions.
    1) Include a column for "Date of Last Fault" (my recommendation).
    2) Have a macro fill in "Latest Fault" when ever anything changes.
    3) Add a column to the list of faults. It would be a formula (=$A1&$F1) and could be added automatically by a macro.

    The shapes will have their own macro, like you have now, that just reads the information from the sheet & puts it into the textbox. Hopefully that way the shape can be moved anywhere you want it.

    I'm on my way out the door right now, but I'll be back in a few hours and finish this.

  14. #14
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Hey Foxguy,

    have a look at the attached, i have managed to put together all the pieces that i have been working on and this is the result.

    When you open this worksheet, if you go into sheet2 and on the pivot table field 'YrPrComp', select one of the 2 options, come back into sheet 1, click on update colouring button, the form will ask you for a range, within this range the colours will be amber, above the range it will be red and below the range the colour will be green; 0 will always be white.

    once you have done that go on the developer tab and run the macro 'Search', this will search for the latest fault on that location in sheet4 and print it in sheet1.

    Now the final bit, if you click on any of the shapes a textbox will appear in the bottom right corner displaying the latest fault inside it.

    I am getting very close to what i exactly want just a few bits need to be added. Firstly the text box is appearing if any cell in the whole sheet (which has any text in it) is selected.
    Secondly i want the inside of the text box to display the corresponding location name first and then followed by the latest fault.

    I hope i get to the stage soon, which i dont think is far off now.

    Regards,

    Abz
    Attached Files Attached Files

  15. #15
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi Abz;

    I'm just now getting to your problem.
    Looks like you don't really need me. You're getting where you need to without any input from me.
    Would you like me to work on it, or just answer questions?

    These are the things I was planning on setting up.
    1) Coloring will be automatic. No need for a button to update them.
    2) Leave the button for changing the color scheme with a few changes.
    2 - A) Load the current values into the form.
    2 - B) Allow the user to select their own colors. (This would require saving the colors somewhers).
    3) Put the Date of Last Fault and Last Fault next to the Location on Sheet 1
    4) Make the shapes as portable as possible so they can be moved to any sheet. (This will have issues that have to resolved for the Button to find them, but I don't anticipate anything particularly difficult).
    5) Could consider allowing the user to select where the Textbox is displayed, but this could be overkill.

  16. #16
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Foxguy,

    I kind of feel a bit stupid now, that i am answering my own queries that i asked in this forum, i think i should be allowed to give myself some reputation, heheh. But anyways all has helped me a lot in getting my job done.

    Quote Originally Posted by foxguy View Post
    1) Coloring will be automatic. No need for a button to update them.
    I thinking leaving the button would be a better option, gives the user an option to enter his own range for the colours.
    Quote Originally Posted by foxguy View Post
    2) Leave the button for changing the color scheme with a few changes.
    2 - A) Load the current values into the form.
    2 - B) Allow the user to select their own colors. (This would require saving the colors somewhers).
    This is what my worksheet is currently doing, a formula is being used to extract the values from the pivot table and then the userform allows the user to select their own range. However i do not want the user to select the colours too, there would always be only the 4 colours, white, green, amber and red
    Quote Originally Posted by foxguy View Post
    3) Put the Date of Last Fault and Last Fault next to the Location on Sheet 1
    I am getting the last fault on this sheet through a macro at the moment, i guess i can trigger that macro with the command button, just makes it quicker, i think to get the latest fault i will have to do the same macro and then paste it in the column next to the fault and then concatenate the 2 columns.

    But do you have a solution to the problem that the txtbox currently does not pickup the location name to which the fault is related?

    Quote Originally Posted by foxguy View Post
    4) Make the shapes as portable as possible so they can be moved to any sheet. (This will have issues that have to resolved for the Button to find them, but I don't anticipate anything particularly difficult).
    This is not required as i am going to have the shapes on the same sheet and is not really beneficial. But just out of interest how would you do that?

    Quote Originally Posted by foxguy View Post
    5) Could consider allowing the user to select where the Textbox is displayed, but this could be overkill.
    I just need the text box to be fixed in a position, saves a lot of headache

    Thanks a lot for your help though, if you could just help through the final stages now, it would really help.

    Regards,
    Abz

  17. #17
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi Abz;

    I personally believe that there should never be out dated information on a sheet. I believe that everything that gives the user information should be updated automatically. They should not have to click any buttons to see the most current information.

    If for some reason it is impractical to update the info immediately, then there should be a date and/or time display of when the info was updated.

    I don't believe that a program is user friendly if the info is not updated instantly or have a date/time attached to it.

    1) Coloring will be automatic. No need for a button to update them.
    I thinking leaving the button would be a better option, gives the user an option to enter his own range for the colours.
    You misunderstood me. I haven't looked at your pivot table or any other data on the workbook, but I assume that the values in C8:C13 can change. I presume that you would want the shapes to change color automatically, not have to click a button to get them to update.
    Having a button to set the range for the different colors is not a bad idea (not how I would do it, but everyone has their own preferences), but I would make the user click the button only to change the range, not update the colors. That should be automatic.

    2) Leave the button for changing the color scheme with a few changes.
    2 - A) Load the current values into the form.
    This is what my worksheet is currently doing, a formula is being used to extract the values from the pivot table and then the userform allows the user to select their own range.
    To have the workbook more user friendly, the range should be stored somewhere and have the from-to range in RngSelect filled in with the current values.
    Storing the values somewhere is how the colors could be updated automatically when C8:C13 change

    I am getting the last fault on this sheet through a macro at the moment, i guess i can trigger that macro with the command button, just makes it quicker, i think to get the latest fault i will have to do the same macro and then paste it in the column next to the fault and then concatenate the 2 columns.
    I wouldn't concatenate them. I would leave them in separate columns. I would also have sheet4 automatically sort itself anytime it changes. Then it would be fairly simple to have the cells with the Latest Fault (date & description) update automatically. No macro to run.

    But do you have a solution to the problem that the txtbox currently does not pickup the location name to which the fault is related?
    I must have missed something. It looks like you already have the Location in it.

    Make the shapes as portable as possible so they can be moved to any sheet.
    This is not required as i am going to have the shapes on the same sheet and is not really beneficial. But just out of interest how would you do that?
    I thought you were going to move them onto some kind of map. Just moving all the macros for the ovals into their own module and making sure they did not refer to ActiveSheet might have been enough. The data that determines their color is on a specific sheet which may not be the ActiveSheet.

    In the attached file, I have changed the name of the module holding the oval subs, and added a sub that opens the Textbox only when an oval is clicked. I think I would consider having the Textbox disappear when the user clicks the shape again rather than when they click an empty cell. That way they can determine for themselves when to get rid of it.
    I also changed the Sheet1 Worksheet_SelectionChange, so that clicking into an empty cell hides the Textbox. I also put a few notes inside it, to give you a couple of pointers on good programming.
    Attached Files Attached Files
    Last edited by foxguy; 07-17-2010 at 09:49 PM.

  18. #18
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Foxguy,

    That was great, the refining of this was exactly what i wanted, now it works fine.

    A few questions, what is the purpose of having 2 similar codes, 1 is in the module 'Oval' and the other is in sheet 1, arent they both doing kind of the same thing?, could you kindly explain them a bit more as to what functions they are doing separately, im not a vba expert. I mean i tried deleting the code in sheet 1 and then the txtbox would appear but it wouldn't disappear so i am guessing its got something to do with that.
    And by the way thanks for the programming advice too.


    Now i think you might hate me for what i am about to say next but it would really help, i have one more request. Is it possible to have another text box (this one does not need to disappear or appear when anything is clicked on, just needs to be constantly displayed in the sheet somewhere) to display the name of the location and its fault count if it is red, i.e. greater than the specified value entered by the user? I think this one would be a lot easier to do.

    let me know if you have any problems understanding what i have just explained, i am not the best at this.

    Regards,
    Abz

  19. #19
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi Abz;

    A few questions, what is the purpose of having 2 similar codes, 1 is in the module 'Oval' and the other is in sheet 1, arent they both doing kind of the same thing?, could you kindly explain them a bit more as to what functions they are doing separately, im not a vba expert. I mean i tried deleting the code in sheet 1 and then the txtbox would appear but it wouldn't disappear so i am guessing its got something to do with that.
    I left your Worksheet_SelectionChange more or less intact so you could see my notes next to your code. I changed it so that when the user clicked on an empty cell it would make the text box disappear (which is what you had also).
    If you look at it again, you will see that I have a line "If False Then", and down further "End If 'False". The code inside that section will never execute because False is never True. That was your code with my notes. Once you understand them you can delete everything from "If False Then" through "End If 'False".
    I mentioned that my preference would have been to have the shape toggle the Textbox on and off, but I didn't want to do it unless that's what you wanted.

    Is it possible to have another text box (this one does not need to disappear or appear when anything is clicked on, just needs to be constantly displayed in the sheet somewhere) to display the name of the location and its fault count if it is red, i.e. greater than the specified value entered by the user?
    Which location would be in the Textbox if there are 2 that are red? Where would the value entered by the user be stored? Or are you planning on having it look at the color of each shape looking for a red one? Or are you going to have the user click another button?

    Since you have already designed one Textbox, you should be able to design this one also. Give me a better idea of what you want inside it and when and/or if it will ever change, and I'll help you figure out where to put the code.

  20. #20
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Foxguy,


    I understand now what the 2 codes were for, once again thank you so much for you help.


    for this next part let me explain it a bit differently, what i want is just to have a text box on one side which would show me the count of faults on the locations(only ones which are red) in the last period. So it would look something like this:

    Count of faults in last period:
    London - 18
    Manchester - 3
    Reading - 5

    How it will achieve this:
    Firstly i will have a an IF statement which will determine whether the count of faults is above the 'amber' range, i.e is in the 'red' range. This is done easily as when the user inputs the range, the range is put in the range table which can be seen on sheet 1 and then the cells can just do a simple comparison.
    Then a macro would would change the pivot table field to 1 before the current selected period and then a vlookup formula would search the values of the locations which are in the 'red' range and paste it in a cell adjacent to the location name.

    Now i need a macro to pick up those locations with their fault counts in the last period and print this information in the text box.

    This text box does not have to appear or disappear in any condition, it will always be there. It will only show the locations which are in the red range and omit the ones which are not.

    Can this be done?

    Regards,
    Abz

  21. #21
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi Abz;

    Sure it can be done. I don't know what you need me for. You can already do all this. The only question is where to put the code, and how and when do you want to update it.

    If you are going to keep the button to update the colors, I would put it in the same macro that is assigned to the button. No point in having 2 buttons. And you wouldn't want the shape colors and the new Textbox to get out of sync with each other.

    Another suggestion. Do Not use range addresses in your macros. Only use names.
    For example:
    In Search() you have
    Please Login or Register  to view this content.
    Don't do it that way. Name the range G8:G13 something like Fault_List then:
    Please Login or Register  to view this content.
    Then later on when you decide to change the design of the sheet (and I guarantee that you will), you can move Range("Fault_List") any where on the sheet, and you don't have to change any addresses in the macros.

    Do the same thing for all addresses in your macros.

    An added benefit is that it makes it easier to debug your macros. You won't have to keep switching back and forth between the VBE and Excel to make sure you are working on the correct range.

    By doing this to the range A22:A24 you can then move that range out of sight and the macros will still know where to find it.
    Last edited by foxguy; 07-18-2010 at 12:07 AM.

  22. #22
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Foxguy,

    Ok i will give this a try on my own and see how i get along with it,right now its 5am here so i better get some sleep and ill give it shot tomorow and if any problems ill get back to you.

    Thanks for that additional advice and all the previous help. Really appreciated that!

    Regards,
    Abz

  23. #23
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    I'll be waiting to hear how you did.

  24. #24
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Hey Foxguy,

    Couldn't get myself around this one, all i could do is the attached, i think this should tell you how limited by programming skills are.

    I want the text box to show all the locations, but in the case where a location does not have a value, just omit that one, in this case i have just put it in as Reading which is at the bottom of the list but it could be anywhere in the list.

    I know you have been of absolute great help to me, but can you help me with this aswell please?

    Thanks,
    Abz
    Attached Files Attached Files

  25. #25
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi Abz;

    Here's your file.

    I put a lot of notes in Worksheet_Change so you can learn how to do this yourself.
    Attached Files Attached Files

  26. #26
    Registered User
    Join Date
    06-08-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Display shape data in a text box?

    Foxguy,


    Thank you soo very much once again, the detailed descriptions have really helped me, atleast now i know exactly what a command line is doing, rather than just copying it from one code to another solely because it was in a similar code so it might help this one too.


    This whole thread on its own has taught me a lot about vba, and i am sure i would be able to get myself through some vba if not all.

    Once again thanks a lot.

    Regards,
    Abz

  27. #27
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Display shape data in a text box?

    Hi Abz;

    You're welcome. I will keep this thread in my subscriptions for at least a month. If something else comes up, just add another message and I'll see it.

    Don't forget to mark the thread solved and rate the answer if you liked it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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