Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation
Message
From
06/07/2004 09:00:37
 
 
To
06/07/2004 07:07:37
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00920948
Message ID:
00920983
Views:
23
>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
Map
View

Click here to load this message in the networking platform