General information
Category:
COM/DCOM and OLE Automation
>Hi Everyone
>
>I am writing an application that creates an excel spreadsheet. All is fine until I decided I needed a comment in the top row, describing what the column is used for. I can generally figure out how to write to the spreadsheet by creating a macro in the spreadsheet, and then looking at the macro code, the code for the comment is as follows.
>
> Range("D1").AddComment
> Range("D1").Comment.Visible = False
> Range("D1").Comment.Text Text:="My Test Comment"
>
>How do I write the automation code for the text line. I have tried oSh.Range("D1").Comment.Text="My Test Comment", but that throws up a "Member Not Found" error. Any help most appreciated.
>
Based on the Excel VBA Help, looks like you need to do something like this:
Range("D1").AddComment("My Test Comment")
Tamar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only