Information générale
Catégorie:
COM/DCOM et 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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement