PC Review


Reply
Thread Tools Rate Thread

Capturing cell address and contents

 
 
=?Utf-8?B?QnJldA==?=
Guest
Posts: n/a
 
      9th Aug 2007
I have an inserted "picture" sitting atop a cell. Im 'Assigning a Macro' to
this picture to execute an event. My question is I would like to capture
both the cell address AND the cell contents of the cell this picture sits
atop of. Can I programmatically capture this from a pictures position?

thank you
 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      9th Aug 2007
Take a look at the Shape Object's TopLeftCell property in XL/VBA Help.

Address: ActiveSheet.Pictures(1).TopLeftCell.Address
Contents: ActiveSheet.Pictures(1).TopLeftCell.Value

In article <85678B9E-B9BC-4375-9842-(E-Mail Removed)>,
Bret <(E-Mail Removed)> wrote:

> I have an inserted "picture" sitting atop a cell. Im 'Assigning a Macro' to
> this picture to execute an event. My question is I would like to capture
> both the cell address AND the cell contents of the cell this picture sits
> atop of. Can I programmatically capture this from a pictures position?
>
> thank you

 
Reply With Quote
 
Peter T
Guest
Posts: n/a
 
      9th Aug 2007
Sub myOnActionMacro()
Dim sCaller As String
Dim sAddr As String
Dim vContents

sCaller = Application.Caller
With ActiveSheet.Shapes(sCaller).TopLeftCell
sAddr = .Address
vContents = .Value
End With

MsgBox sCaller & vbCr & sAddr & vbCr & vContents

End Sub

Regards,
Peter T

"Bret" <(E-Mail Removed)> wrote in message
news:85678B9E-B9BC-4375-9842-(E-Mail Removed)...
> I have an inserted "picture" sitting atop a cell. Im 'Assigning a Macro'

to
> this picture to execute an event. My question is I would like to capture
> both the cell address AND the cell contents of the cell this picture sits
> atop of. Can I programmatically capture this from a pictures position?
>
> thank you



 
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
Excel cell address from cell contents TQuestar Microsoft Excel New Users 3 15th Jan 2010 04:03 AM
Return cell address of a cell based on contents of cell. Danny Microsoft Excel Worksheet Functions 4 15th Nov 2008 03:11 AM
Comparing cell contents, know cell address molsansk Microsoft Excel Misc 4 10th Dec 2007 04:44 PM
linking to contents of a cell vs cell address =?Utf-8?B?QWluU0Y=?= Microsoft Excel Worksheet Functions 0 6th Sep 2006 06:57 PM
store cell contents and cell address for comparsion & suming =?Utf-8?B?SmltIFdoZWxjaGVs?= Microsoft Excel Programming 1 24th Nov 2004 04:03 PM


Features
 

Advertising
 

Newsgroups
 


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