Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add and delete pictures and shapes jlclyde Excel Discussion (Misc queries) 2 October 22nd 08 02:54 PM
Make easier to use formula's / have better / useful examples nastech Excel Discussion (Misc queries) 1 October 30th 07 01:19 AM
Manipulating shapes thePriest Excel Discussion (Misc queries) 0 April 20th 05 06:41 PM
Script to make my life easier?? dvshooter Excel Programming 1 June 3rd 04 04:07 PM
manipulating pictures with VBA sec12205 Excel Programming 2 August 28th 03 04:36 PM


All times are GMT +1. The time now is 02:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"