Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
manipulating displayed pictures: can I rename the various Shapes to make coding easier.
I have a spreadsheet, used as a data collection form, which incidentally
displays a corporate division logo. I would like the logo displayed to be dependent on a particular value entered, a value identifying the corporate division. I can record a macro, which changes which logo is in front, and in the process discovered the names of particular logo graphics (e.g. activesheet.shape("picture 10").select) For each logo graphic, I have recorded code that puts that graphic on top of a blank gif, which in turn covers all the other graphics. I have a Select Case statement, which determines, on the basis of entered data, which code runs, and therefore which logo graphic shows on the page. I was wondering if there is a way to rename "picture 10" to something more meaningful. It sure would make the code easier to read. Is it possible to give graphics, names, and to manipulate those graphics, by name? Is there a better way than just having all possible graphics in place, and manipulating the layering to determine which one shows? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
manipulating displayed pictures: can I rename the various Shapes to make coding easier.
Hi B J,
I was wondering if there is a way to rename "picture 10" to something more meaningful. It sure would make the code easier to read. Sub Tester02() ActiveSheet.Pictures("Picture 10").name = "CompanyABC_Logo" End Sub --- Regards, Norman "B J W" wrote in message ... I have a spreadsheet, used as a data collection form, which incidentally displays a corporate division logo. I would like the logo displayed to be dependent on a particular value entered, a value identifying the corporate division. I can record a macro, which changes which logo is in front, and in the process discovered the names of particular logo graphics (e.g. activesheet.shape("picture 10").select) For each logo graphic, I have recorded code that puts that graphic on top of a blank gif, which in turn covers all the other graphics. I have a Select Case statement, which determines, on the basis of entered data, which code runs, and therefore which logo graphic shows on the page. I was wondering if there is a way to rename "picture 10" to something more meaningful. It sure would make the code easier to read. Is it possible to give graphics, names, and to manipulate those graphics, by name? Is there a better way than just having all possible graphics in place, and manipulating the layering to determine which one shows? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
manipulating displayed pictures: can I rename the various Shapes tomake coding easier.
Manually, you can select the picture (when it's visible) and then type the new
name in the namebox (to the left of the formula bar). Remember to hit enter when you're done typing the new name. (and your approach sounds as reasonable as any--if the other pictures don't add too much to the size of your workbook.) If you don't want to share those other pictures (even though they're hidden), you could just import a picture from a common folder each time you need one. B J W wrote: I have a spreadsheet, used as a data collection form, which incidentally displays a corporate division logo. I would like the logo displayed to be dependent on a particular value entered, a value identifying the corporate division. I can record a macro, which changes which logo is in front, and in the process discovered the names of particular logo graphics (e.g. activesheet.shape("picture 10").select) For each logo graphic, I have recorded code that puts that graphic on top of a blank gif, which in turn covers all the other graphics. I have a Select Case statement, which determines, on the basis of entered data, which code runs, and therefore which logo graphic shows on the page. I was wondering if there is a way to rename "picture 10" to something more meaningful. It sure would make the code easier to read. Is it possible to give graphics, names, and to manipulate those graphics, by name? Is there a better way than just having all possible graphics in place, and manipulating the layering to determine which one shows? -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
manipulating displayed pictures: can I rename the various Shapes to make coding easier.
"Dave Peterson" wrote in message ... Manually, you can select the picture (when it's visible) and then type the new name in the namebox (to the left of the formula bar). I knew that there was a place in the interface to do it -- I just did not cotton to that. I used the other poster's suggestion for re-naming in VBA, but I will remember the namebox in the future. B J W wrote: I have a spreadsheet, used as a data collection form, which incidentally displays a corporate division logo. I would like the logo displayed to be dependent on a particular value entered, a value identifying the corporate division. I can record a macro, which changes which logo is in front, and in the process discovered the names of particular logo graphics (e.g. activesheet.shape("picture 10").select) For each logo graphic, I have recorded code that puts that graphic on top of a blank gif, which in turn covers all the other graphics. I have a Select Case statement, which determines, on the basis of entered data, which code runs, and therefore which logo graphic shows on the page. I was wondering if there is a way to rename "picture 10" to something more meaningful. It sure would make the code easier to read. Is it possible to give graphics, names, and to manipulate those graphics, by name? Is there a better way than just having all possible graphics in place, and manipulating the layering to determine which one shows? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add and delete pictures and shapes | Excel Discussion (Misc queries) | |||
Make easier to use formula's / have better / useful examples | Excel Discussion (Misc queries) | |||
Manipulating shapes | Excel Discussion (Misc queries) | |||
Script to make my life easier?? | Excel Programming | |||
manipulating pictures with VBA | Excel Programming |