Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default add comment to object

i never heard of a 'comment' property and you don't say what kind of object.
what i'll assume is you want to associate some sort of permanent text
string?

depending on the object, i sometimes i hijack another property for what I
want. the TAG property (e.g., userforms, toolbar buttons) as easy when
available
sometimes its easy to use a custom document property, a name, a cell on a
hidden sheet, or a registry entry (check out savesetting and getsetting
fuctions)

you can attach to any existing object model if you could create your own
object:

Public Type objWS
sht As Worksheet
myComment As String
End Type

Sub x()
Dim s As objWS
Set s.sht = Sheet1
s.myComment = "some text"
Debug.Print s.sht.Name & " " & s.cmt
End Sub

HTH - voodooJoe

"Ronbo" wrote in message
...
How can I add a comment to an object?

As always thanks for any help.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default add comment to object

How can I add a comment to an object?

As always thanks for any help.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default add comment to object

Not really following. Objects have properties (describe the object or an
attribute of the object) and methods (things the object can do). What do you
mean by a comment.

Additionally is this object one of the existing Objects from Excel (such as
a sheet or a range) or is this a custom object you created by instantiating a
class that you wrote?

--
HTH...

Jim Thomlinson


"Ronbo" wrote:

How can I add a comment to an object?

As always thanks for any help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default add comment to object

If you mean a shape on the worksheet, maybe you can widen the column, increase
the row height and put a comment on that cell that is below that object.

You'll see the comment when your mouse is over the cell, but not over the shape.

Ronbo wrote:

How can I add a comment to an object?

As always thanks for any help.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default add comment to object

Sorry for the bad question.

Thanks for the help.

I want to find a way that I can create a help button (a text box named
"rectangle 13") so that if the user needs help on the tem, they can click on
the help object and a help screen like a comment will popup.

I have an Object = Rectangle 13. To it i added a macro "a"

macro "a" = ActiveSheet.Shapes("Rectangle 13").Comment.Text Text:="Test"
& Chr(10) & ""

I hope this helps some.

Again, Thanks for the help



"Dave Peterson" wrote:

If you mean a shape on the worksheet, maybe you can widen the column, increase
the row height and put a comment on that cell that is below that object.

You'll see the comment when your mouse is over the cell, but not over the shape.

Ronbo wrote:

How can I add a comment to an object?

As always thanks for any help.


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default add comment to object

You could assign a macro to that rectangle (just rightclick on it and choose
assign macro).

If the amount of words is small, you could use a message box:

option explicit
sub testme()
msgbox "Your help text here"
end sub

If the amount of words is large, you could create your own user form and show
that.

John Walkenbach has done lots of the work for you:
http://j-walk.com/ss/excel/tips/tip51.htm

Ronbo wrote:

Sorry for the bad question.

Thanks for the help.

I want to find a way that I can create a help button (a text box named
"rectangle 13") so that if the user needs help on the tem, they can click on
the help object and a help screen like a comment will popup.

I have an Object = Rectangle 13. To it i added a macro "a"

macro "a" = ActiveSheet.Shapes("Rectangle 13").Comment.Text Text:="Test"
& Chr(10) & ""

I hope this helps some.

Again, Thanks for the help

"Dave Peterson" wrote:

If you mean a shape on the worksheet, maybe you can widen the column, increase
the row height and put a comment on that cell that is below that object.

You'll see the comment when your mouse is over the cell, but not over the shape.

Ronbo wrote:

How can I add a comment to an object?

As always thanks for any help.


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default add comment to object

Dave: Thanks for your responses. The first response would work, in a round
about way. The MsgBox was an option, however I have not made professional
looking MsgBoxes (long ones) and it is a large amount of words. In my
initial research I started with Walkenbach's Chapter 23 "Providing Help for
Your Applications" from his book Excel 2000 Power Programming w/ VBA. I
thought there would be easier ways such as attaching a comment to a
object/shape.

I will go from here, to the site you led me to.

Again thanks you and the others for your time and help.

"Dave Peterson" wrote:

You could assign a macro to that rectangle (just rightclick on it and choose
assign macro).

If the amount of words is small, you could use a message box:

option explicit
sub testme()
msgbox "Your help text here"
end sub

If the amount of words is large, you could create your own user form and show
that.

John Walkenbach has done lots of the work for you:
http://j-walk.com/ss/excel/tips/tip51.htm

Ronbo wrote:

Sorry for the bad question.

Thanks for the help.

I want to find a way that I can create a help button (a text box named
"rectangle 13") so that if the user needs help on the tem, they can click on
the help object and a help screen like a comment will popup.

I have an Object = Rectangle 13. To it i added a macro "a"

macro "a" = ActiveSheet.Shapes("Rectangle 13").Comment.Text Text:="Test"
& Chr(10) & ""

I hope this helps some.

Again, Thanks for the help

"Dave Peterson" wrote:

If you mean a shape on the worksheet, maybe you can widen the column, increase
the row height and put a comment on that cell that is below that object.

You'll see the comment when your mouse is over the cell, but not over the shape.

Ronbo wrote:

How can I add a comment to an object?

As always thanks for any help.

--

Dave Peterson


--

Dave Peterson

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
Inserting word object - Missing the comment feature in ribbon J. New Users to Excel 0 September 16th 09 04:06 PM
How can I edit a comment w/o first having to select Show Comment Mary Ann Excel Discussion (Misc queries) 1 August 26th 05 12:34 AM
What is the deal with Comment Object Positioning? Mark Excel Discussion (Misc queries) 3 June 9th 05 11:05 PM
Attach comment to object Neil Jimack Excel Worksheet Functions 1 May 12th 05 02:16 AM
a comment plugin & copy paste directly from excel to comment ? fr. RFM Excel Worksheet Functions 0 December 1st 04 11:29 PM


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