View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default locate picture location using macro

Not sure exactly what you're doing, since b, d, and e are columns, not
rows, but you can fine the top left cell and bottom right cell of a
shape using the TopLeftCell and BottomRightCell properties:


Msgbox "Top Left Row: " & Pictures("Picture 1").TopLeftCell.Row

In article ,
ME @ Home wrote:

i have a sheet which among other things contains 3 coloum of images, the idea
of the images is that once clicked they activate a macro which runs asking
the user 4 questions , the macro then pastes the data into a preset area (in
the same row as the button and then deletes the pic that was clicked)

at the min it looks like i have to write identical macros for each image ,
with only the position (row) numbers changing,,,, is their a macro \ control
function that can read the location of the picture

row a b c d e
name picture picture

row b is fixed data .... row c,d,e are where data will be entered by the
macro after the ? are ansered