PC Review


Reply
Thread Tools Rate Thread

How do I assign a picture to a cell

 
 
Brett17
Guest
Posts: n/a
 
      23rd Oct 2008
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 With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      23rd Oct 2008
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" <(E-Mail Removed)> wrote in message
news:82A3D79E-597F-43D7-AE76-(E-Mail Removed)...
>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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assign a resource to a Picture Box programatically Jürgen Heyn Microsoft VB .NET 5 13th Jan 2012 01:25 AM
can assign a picture to a cell ? Mr B Microsoft Excel Worksheet Functions 1 30th Jul 2008 01:31 PM
Can you assign a value to a picture within excel? =?Utf-8?B?QmlnIEQ=?= Microsoft Excel Programming 3 1st Apr 2007 01:51 PM
How to assign the image field in the picture Box soma.gunasekaran@gmail.com Microsoft VB .NET 0 27th Feb 2007 11:49 AM
How do I assign a Macro to a picture in Word =?Utf-8?B?T25lU291bA==?= Microsoft Word Document Management 3 30th Oct 2006 02:11 PM


Features
 

Advertising
 

Newsgroups
 


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