Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.computer > #10531

Re: OT: How find Excel Picture number

From Robert Baer <robertbaer@localnet.com>
Newsgroups alt.computer, sci.electronics.design
Subject Re: OT: How find Excel Picture number
References <DAxMB.4$zb.2@fx44.iad> <otue9v$1701$1@gioia.aioe.org>
Message-ID <W7QMB.7971$sC6.1410@fx35.iad> (permalink)
Date 2017-11-08 19:41 -0800

Cross-posted to 2 groups.

Show all headers | View raw


Martin Brown wrote:
> On 08/11/2017 06:35, Robert Baer wrote:
>>    In Excel, I was able to find the names/picture numbers for the
>> first two shapes by trial and error.
>>    Then i added a third shape and unable to find the number; up to
>> Number 35 and am tired of this BS.
>>    Is there a way of finding it so i can use it?
>>    As in ActiveSheet.Shapes(<name>).Select ?
>>
>>    Thanks.
>
> Your problem here is that a lot of other things are shapes - search
> through the range of shapes checking for those with .Type=msoPicture
* Range of shapes? when one cannot be eXplicitly be found?
   Not an option.
>
> Their name will begin with "Picture " too but that is slower.
>
> Either insert all the pictures first or last if you want them to be in
> consecutive numerical order.
* Oh, but i did; made some changes, and deleted some to create/insert 
others. Am thinking this latest addition is way out there, like Picture 
75 as a guess.
>
   There is absolutely no way to access these directly, much less in order.
   After a lot of messing around, this was only reliable result:

  pic = 1 ' or object but NOT picture
  ' 1=vert; 2=horiz; 3=frame; 4=small; 5=title
  For Each iobj In ActiveSheet.Shapes    'DrawingObjects
   iobj.Select
   If pic = 2 Then
     Selection.Copy  'get horizontal jumper
   End If
   pic = pic + 1
  Next iobj

   For removal of stuff/objects added by program:

Klear:
     'Erase jumpers for next try
      ' 1=vert; 2=horiz; 3=frame; 4=small; 5=title
  num = 1
  For Each iobj In ActiveSheet.Shapes    'DrawingObjects
   iobj.Select
   If num > 4 Then
    iobj.Delete
   End If
   num = num + 1
  Next iobj
  Close

   Note my objects 1-4 are reference for copy/paste operations.

Back to alt.computer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

OT: How find Excel Picture number Robert Baer <robertbaer@localnet.com> - 2017-11-07 22:35 -0800
  Re: OT: How find Excel Picture number Paul <nospam@needed.invalid> - 2017-11-08 01:45 -0500
    Re: OT: How find Excel Picture number Robert Baer <robertbaer@localnet.com> - 2017-11-08 00:13 -0800
      Re: OT: How find Excel Picture number Paul <nospam@needed.invalid> - 2017-11-08 03:21 -0500
        Re: OT: How find Excel Picture number Robert Baer <robertbaer@localnet.com> - 2017-11-08 19:51 -0800
  Re: OT: How find Excel Picture number Jeroen Belleman <jeroen@nospam.please> - 2017-11-08 09:12 +0100
    Re: OT: How find Excel Picture number Robert Baer <robertbaer@localnet.com> - 2017-11-08 19:23 -0800
  Re: OT: How find Excel Picture number Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-11-08 08:12 +0000
    Re: OT: How find Excel Picture number Robert Baer <robertbaer@localnet.com> - 2017-11-08 19:41 -0800
      Re: OT: How find Excel Picture number Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-11-09 08:33 +0000
        Re: OT: How find Excel Picture number Robert Baer <robertbaer@localnet.com> - 2017-11-09 09:55 -0800
          Re: OT: How find Excel Picture number Paul <nospam@needed.invalid> - 2017-11-09 14:12 -0500
            Re: OT: How find Excel Picture number Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-11-09 20:20 +0000
            Re: OT: How find Excel Picture number Robert Baer <robertbaer@localnet.com> - 2017-11-10 17:15 -0800
              Re: OT: How find Excel Picture number Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-11-13 16:32 +0000

csiph-web