Hi Thomas,
Thanks again for all the help. I did look at the book and will probably buy it. Most of the books I have on VFP do not address Excel and of course my Excel books dont' know VFP.
This Works from VFP 5/6:
* Insert Detail rows
ColStart='C' ** assuming you know the best column to use and it's not the Active Col
RowStart=Excel.ActiveCell.OffSet(+1,0).Row
*Insert Total rows
ColEnd='C'
RowEnd=Excel.ActiveCell.OffSet(-1,0).Row
lcRange=ColStart+LTRIM(STR(RowStart))+':'ColEnd+LTRIM(STR(RowEnd))
.Range(lcRange).DELETE
or if the best col is the Active one:
* Insert Detail rows
ColStart=Excel.ActiveCell.OffSet(+1,0).Column
RowStart=Excel.ActiveCell.OffSet(+1,0).Row
*Insert Total rows
ColEnd=Excel.ActiveCell.OffSet(-1,0).Column
RowEnd=Excel.ActiveCell.OffSet(-1,0).Row
lcRange=LTRIM(STR(ColStart))+LTRIM(STR(RowStart))+':'+LTRIM(STR(ColEnd))+LTRIM(STR(RowEnd))
.Range(lcRange).DELETE
*
Of course you could pass the Col/Row parameters to this .prg.
Have a nice day and get some sleep.
Regards,
Paige
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