Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Shaun
 
Posts: n/a
Default Linking Comment to Cell

I need to link information found in other sheets of my workbook to comment
boxes on my first sheet. Can this be done, and if so, how?? Any help is
much appreciated, thanks.

Shaun
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Linking Comment to Cell

Try this UDF:

Function copycomment(r As Range)
Application.Volatile
Dim whereami As Range
Set whereami = Application.Caller
If whereami.Comment Is Nothing Then
Else
whereami.Comment.Delete
End If
whereami.AddComment Text:=r.Value
copycomment = ""
End Function
--
Gary''s Student


"Shaun" wrote:

I need to link information found in other sheets of my workbook to comment
boxes on my first sheet. Can this be done, and if so, how?? Any help is
much appreciated, thanks.

Shaun

  #3   Report Post  
Posted to microsoft.public.excel.misc
Shaun
 
Posts: n/a
Default Linking Comment to Cell

Thank you very much, but I think this may be more technical than I am.
UDF?
What do I do with this code?

Shaun

"Gary''s Student" wrote:

Try this UDF:

Function copycomment(r As Range)
Application.Volatile
Dim whereami As Range
Set whereami = Application.Caller
If whereami.Comment Is Nothing Then
Else
whereami.Comment.Delete
End If
whereami.AddComment Text:=r.Value
copycomment = ""
End Function
--
Gary''s Student


"Shaun" wrote:

I need to link information found in other sheets of my workbook to comment
boxes on my first sheet. Can this be done, and if so, how?? Any help is
much appreciated, thanks.

Shaun

  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Linking Comment to Cell

Putting the code in is easy, just copy and paste from my post. See:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

By the way, with a small modification, the function can put the value in a
cell into any other cells's comment, not just the cell containing the
function.

This is an exception to the general rule about a function only returning a
value to a single cell.
--
Gary''s Student


"Shaun" wrote:

Thank you very much, but I think this may be more technical than I am.
UDF?
What do I do with this code?

Shaun

"Gary''s Student" wrote:

Try this UDF:

Function copycomment(r As Range)
Application.Volatile
Dim whereami As Range
Set whereami = Application.Caller
If whereami.Comment Is Nothing Then
Else
whereami.Comment.Delete
End If
whereami.AddComment Text:=r.Value
copycomment = ""
End Function
--
Gary''s Student


"Shaun" wrote:

I need to link information found in other sheets of my workbook to comment
boxes on my first sheet. Can this be done, and if so, how?? Any help is
much appreciated, thanks.

Shaun

  #5   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Linking Comment to Cell

Shaun

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste GS's CopyComment code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Enter the formula in Sheet1 in the cell you want the comment in.

=CopyComment(Sheet2!A4)


Gord Dibben Excel MVP

On Tue, 27 Jun 2006 10:06:02 -0700, Shaun
wrote:

Thank you very much, but I think this may be more technical than I am.
UDF?
What do I do with this code?

Shaun

"Gary''s Student" wrote:

Try this UDF:

Function copycomment(r As Range)
Application.Volatile
Dim whereami As Range
Set whereami = Application.Caller
If whereami.Comment Is Nothing Then
Else
whereami.Comment.Delete
End If
whereami.AddComment Text:=r.Value
copycomment = ""
End Function
--
Gary''s Student


"Shaun" wrote:

I need to link information found in other sheets of my workbook to comment
boxes on my first sheet. Can this be done, and if so, how?? Any help is
much appreciated, thanks.

Shaun


Gord Dibben MS Excel MVP
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
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM
linking to a cell within a text cell or comment BlueJ2005 Excel Worksheet Functions 0 May 11th 06 10:36 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
displaying a comment only when the cell is selected Jeff Excel Discussion (Misc queries) 2 July 6th 05 09:21 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"