Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel
Message
From
19/07/2005 13:02:13
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/07/2005 11:56:58
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Re: Excel
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01033830
Message ID:
01033918
Views:
15
This message has been marked as the solution to the initial question of the thread.
loRange.Address
loRange.Rows.Count
loRange.Columns.Count
loRange.Rows(2).Columns(3).Address
...
etc. is supported. ie: You might do this

loRange.Columns(5).Name = "mySumCol"
or:
loRange.Columns("D").Name = "mySumCol" && D is 4th col in range and might be actually say S column

.Formula = "=sum(mySumCol)"

Cetin



>toExcel.ActiveWorkBook.ActiveSheet.RANGE(m.lcRange).PasteSpecial()
>
>how do I know what row I am on right now???
>need something like:
>
>x2=loRange.LastRow
>x1=x2-lnNumRows
>
>x3=[=SUM(D]+tran(x1)+[:D]+tran(x2)+[)]
>
>unfortunately the vba help does not seem to help me at all here <s>
>
>Thanks
>
>Peter
>
>
>
>>>I am still working on by balnce sheet with all group totals on sheet 1 and the detail on sheet 2
>>>sheet one has hyperlinks to the groups in sheet 2
>>>so if you click on Current Assest (cell A1) sheet 2 come to the fore with the range containing all accounts for tis group highlighted.
>>>
>>>so far so good. When I create the ranges I do an pastespecial as advised by Cetin Basoz.
>>>
>>>But I want a total in sheet 1 in cell B8
>>>
>>>See: www.cortiel.com/bs_xl.htm
>>>
>>>any ideas how to get the formula from a range object which in this example id A5:H19 but I want =Sum(Sheet2!D6:D19)
>>>
>>>thanks alot!
>>>
>>>Peter
>>
>>Peter,
>>Not sure I understood the question.
>>
>>.Range('B8').Formula = "=Sum(Sheet2!D6:D19)"
>>
>>Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform