.xls comments & VBA ?

  • Thread starter Thread starter mark1
  • Start date Start date
M

mark1

1. Is there a quick and easy way to turn my cell comment
into a validation message? Right now, I'm manually
displaying the comment and typing it into the cell
validation message.

2. Random VBA question:
When should you use the Set keyword?
Why this:
Set x = Range("A1")
when you can do this:
x = Range("A1")

Thanks for the help!!
 
Mark,

1) There is no built in way to convert comments to data
validation messages. You have to do it manually, or write code
to automate the procedure.

2) You use the Set keyword when you want to set a variable to an
object. The two lines of code:

Set x = Range("A1")
' and
x = Range("A1")

are NOT the same. They do very different things. The first sets
the variable x to the Range("A1"). Once this is set, you can call
upon the various methods and properties of a Range type variable
from x (e.g., x.Value, x.Address, etc). The second line of code
put the Value of A1 in to the variable x. This is quite clear if
you take the time and effort to declare your variables and give
them explicit data types, e.g., Dim x As Range or Dim x As
Double.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top