Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel Automation
Message
De
06/07/2004 09:00:37
 
 
À
06/07/2004 07:07:37
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00920948
Message ID:
00920983
Vues:
22
>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
Fil
Voir

Click here to load this message in the networking platform