Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I assign a picture to a cell

I have 5 pictures (well 5 copies of 1 pic) that I want in B2 C4 C6 D3 & D5 to
begin with. I guess thats a reset button. Next I want to be able to move the
pics one at a time, but can only be put in certain cells. Click move Click
preferred but Click & Drag ok. And last I need a counter eg number of moves.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default How do I assign a picture to a cell

Pictures, indeed all objects (except comments) are not assigned to cells.
They have a position coordinates, L,T,W, & H. Also you can return, though
not set, the TopLeft and BottomRight corner cells as range objects.

To position an object in a particular cell you can do this

dim rCell as Range
dim shp As Shape
Set shp = Activesheet.Shapes("Picture 1")
set rCell = Range("B2")
With shp
..Left = rCell.Left
..Top = rCell.Top
End With

It's easy to implement the above in with multiple objects. You do though
need to have an idea of how (eg names or index) to reference the objects and
corresponding cells.

If you get stuck post back the names of your pictures and related cells.

I have no idea what you mean by counter and moves.

Regards,
Peter T

"Brett17" wrote in message
...
I have 5 pictures (well 5 copies of 1 pic) that I want in B2 C4 C6 D3 & D5
to
begin with. I guess thats a reset button. Next I want to be able to move
the
pics one at a time, but can only be put in certain cells. Click move Click
preferred but Click & Drag ok. And last I need a counter eg number of
moves.



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
Assign Color to a Cell based on another Cell on a diff Sheet VROSARIO7 Excel Worksheet Functions 2 July 6th 09 08:53 PM
Inserting a Picture using Cell as picture name. the-jackal Links and Linking in Excel 12 November 10th 08 09:21 AM
can assign a picture to a cell ? Mr B Excel Worksheet Functions 1 July 30th 08 01:31 PM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
Can you assign a value to a picture within excel? Big D Excel Programming 3 April 1st 07 01:51 PM


All times are GMT +1. The time now is 09:29 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"