Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem creating Excel cell comment from VFP

Status
Not open for further replies.

beesman

Programmer
Oct 10, 2003
6
GB
Hi,

I'm trying to insert a database field (bigprac.longdesc) into an Excel chart as a cell's comment, but am failing miserably! I'm getting a syntax error with the following code:

Code:
With cells(i+spacesafter+1,4).AddComment
.Visible = False
.Text "ALLT(bigprac.longdesc)" & Date
End With

I'm not sure what's wrong, & have checked other forum posts without luck, so any help very appreciated. TIA.
 
Should your line of code look like this instead?
[tt]
.Text = "ALLT(bigprac.longdesc)" & Date
[/tt]
 
beesman

With cells(i+spacesafter+1,4).AddComment
.Visible = False
.Text "ALLT(bigprac.longdesc)" & Date
End With


It seems to be VB code, but false should .F.
The "&" in VB means "+" so it should be changed (providing you switch to a text format.
Text should ahve an "=" sign after.
The "cells" most likely should have most likely ".cell".
It seems you are trying to use VB code in VFP, but you seem unfamilar as to what VFP needs to work.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top