I'm having trouble with adding a comment to a cell in Excel. The VB code
(recorded from a macro) looks like this:
Range("G1").Select
Range("G1").AddComment
Range("G1").Comment.Visible = False
Range("G1").Comment.Text Text:="Some Text"
I've tried a formula with:
xl.Worksheets(1).Range("G1").AddComment //didn't like this
xl.Worksheets(1).Range("G1").Comment = "Some Text" // nope
xl.Worksheets(1).Range("G1").Comment.Text = "Some Text" //no.
Does anyone here know how to do this?
Paul Bryan
ABL Electronics Corporation
410-584-2738 x133
pbryan@ablcables.com
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.hp.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------
(recorded from a macro) looks like this:
Range("G1").Select
Range("G1").AddComment
Range("G1").Comment.Visible = False
Range("G1").Comment.Text Text:="Some Text"
I've tried a formula with:
xl.Worksheets(1).Range("G1").AddComment //didn't like this
xl.Worksheets(1).Range("G1").Comment = "Some Text" // nope
xl.Worksheets(1).Range("G1").Comment.Text = "Some Text" //no.
Does anyone here know how to do this?
Paul Bryan
ABL Electronics Corporation
410-584-2738 x133
pbryan@ablcables.com
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.hp.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------
right window.
Look at the bottom it says METHOD Comment AddComment([text])
that means you use
xl.Worksheets(1).Range("G1").AddComment("mycomment");
A method is like a function so you need () the [] symbols tell you the
argument is optional.
In answer to your last post, try using GetObject to see if an excel app is
open. Try using Worksheets.Count to get the number, then looping with
Worksheets(i).Name to get the name of each one. You may be able to do the
same with workbooks, you'll have to check.
-----Original Message-----
From: Paul Bryan [mailto:pbryan@ablcables.com]
Sent: Tuesday, February 22, 2000 10:36 AM
To: VEE Usergroup (E-Mail)
Subject: vrf VRF - Creating "comments" in Excel.
I'm having trouble with adding a comment to a cell in Excel. The VB code
(recorded from a macro) looks like this:
Range("G1").Select
Range("G1").AddComment
Range("G1").Comment.Visible = False
Range("G1").Comment.Text Text:="Some Text"
I've tried a formula with:
xl.Worksheets(1).Range("G1").AddComment //didn't like this
xl.Worksheets(1).Range("G1").Comment = "Some Text" // nope
xl.Worksheets(1).Range("G1").Comment.Text = "Some Text" //no.
Does anyone here know how to do this?
Paul Bryan
ABL Electronics Corporation
410-584-2738 x133
pbryan@ablcables.com
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.hp.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.hp.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------