At 11:07 2018-02-15, Gene Wirchenko genew@telus.net wrote:
At 10:57 2018-02-15, "Fernando D. Bozzo" fdbozzo@gmail.com wrote:
To talk with an example, if you have this:
oObj = createobject("custom") reference = "oObj"
The you have at least 3 options:
The way you know => &reference..referredto
Using evaluate => =Evaluate(reference + ".referredto")
My preferred: Caching the object and then using it:
oRef = Evaluate(reference) ? oRef.refered1 ? oRef.refered2 ...
I was hoping to avoid evaluate(), but your third way makessense. I will check if it works in all the contexts I am thinking of. (I was using "object" and "reference" rather loosely.)
Unfortunately, it does not work in my usual use case: as an alias. Example: use ccli where=evaluate("ccli") && Nope ? where.clcode
Sincerely,
Gene Wirchenko
You cannot use a field as an form Property. What are you trying to accomplish here?
Op do 15 feb. 2018 om 20:17 schreef Gene Wirchenko genew@telus.net
At 11:07 2018-02-15, Gene Wirchenko genew@telus.net wrote:
At 10:57 2018-02-15, "Fernando D. Bozzo" fdbozzo@gmail.com wrote:
To talk with an example, if you have this:
oObj = createobject("custom") reference = "oObj"
The you have at least 3 options:
The way you know => &reference..referredto
Using evaluate => =Evaluate(reference + ".referredto")
My preferred: Caching the object and then using it:
oRef = Evaluate(reference) ? oRef.refered1 ? oRef.refered2 ...
I was hoping to avoid evaluate(), but your third way makessense. I will check if it works in all the contexts I am thinking of. (I was using "object" and "reference" rather loosely.)
Unfortunately, it does not work in my usual use case: as analias. Example: use ccli where=evaluate("ccli") && Nope ? where.clcode
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
On Thu, Feb 15, 2018 at 2:16 PM, Gene Wirchenko genew@telus.net wrote:
Unfortunately, it does not work in my usual use case: as an alias.Example: use ccli where=evaluate("ccli") && Nope ? where.clcode
Well, in that case you should be using an alias:
use ccli alias TheTable
? TheTable.clcode
Gene, you did talk about objects, not tables and fields. They are not treated the same way.
In this case, then Ted is right, the alias must be used.
You can use generically with something like this:
use ccli alias *mytable* ? *mytable*.clcode
Nice thing about aliases is that you can use the same alias for any table in the case that those tables have the same fields you want to access.
2018-02-15 20:16 GMT+01:00 Gene Wirchenko genew@telus.net:
At 11:07 2018-02-15, Gene Wirchenko genew@telus.net wrote:
At 10:57 2018-02-15, "Fernando D. Bozzo" fdbozzo@gmail.com wrote:
To talk with an example, if you have this:
oObj = createobject("custom") reference = "oObj"
The you have at least 3 options:
The way you know => &reference..referredto
Using evaluate => =Evaluate(reference + ".referredto")
My preferred: Caching the object and then using it:
oRef = Evaluate(reference) ? oRef.refered1 ? oRef.refered2 ...
I was hoping to avoid evaluate(), but your third way makes sense. Iwill check if it works in all the contexts I am thinking of. (I was using "object" and "reference" rather loosely.)
Unfortunately, it does not work in my usual use case: as an alias.Example: use ccli where=evaluate("ccli") && Nope ? where.clcode
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
(part 2)
Gene, about the alias thing:
If you have your table already open with something like this:
use ccli
Then you can re-open the same table under another alias this way:
use ccli alias *mytable again shared* ? *mytable*.clcode ... use in (select("mytable"))
Interesting things about this: - VFP does not create a second handle to the table, just reuse the existing one with another name - Because of that, the reopening with different aliases is the fastest way to reuse an already opened table - Each alias have it's own record pointer and can have it own index too, without interfering with the other aliases - Aliases allows you to encapsulate functionality for a group of tables that share one or more fields when you need to treat them the same way
2018-02-15 20:50 GMT+01:00 Fernando D. Bozzo fdbozzo@gmail.com:
Gene, you did talk about objects, not tables and fields. They are not treated the same way.
In this case, then Ted is right, the alias must be used.
You can use generically with something like this:
use ccli alias *mytable* ? *mytable*.clcodeNice thing about aliases is that you can use the same alias for any table in the case that those tables have the same fields you want to access.
2018-02-15 20:16 GMT+01:00 Gene Wirchenko genew@telus.net:
At 11:07 2018-02-15, Gene Wirchenko genew@telus.net wrote:
At 10:57 2018-02-15, "Fernando D. Bozzo" fdbozzo@gmail.com wrote:
To talk with an example, if you have this:
oObj = createobject("custom") reference = "oObj"
The you have at least 3 options:
The way you know => &reference..referredto
Using evaluate => =Evaluate(reference + ".referredto")
My preferred: Caching the object and then using it:
oRef = Evaluate(reference) ? oRef.refered1 ? oRef.refered2 ...
I was hoping to avoid evaluate(), but your third way makes sense.I will check if it works in all the contexts I am thinking of. (I was using "object" and "reference" rather loosely.)
Unfortunately, it does not work in my usual use case: as an alias.Example: use ccli where=evaluate("ccli") && Nope ? where.clcode
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]
I have a program which calls in excel (excel 2010) and it works well however with the advent of Excel 365 I can not make the call and get it to work below is the sample code used and it does work on 2010. Any help would be appreciated.
thank you in advance
Roger
LOCAL loExcel loExcel = CREATEOBJECT("EXCEL.APPLICATION") loExcel.workbooks.open("C:\dev\BARNS\CLIP\BARCODE.xls") loExcel.visible = .t.
Dne 24.2.2020 v 23:24 roger tremblay napsal(a):
I have a program which calls in excel (excel 2010) and it works well however with the advent of Excel 365 I can not make the call and get it to work below is the sample code used and it does work on 2010. Any help would be appreciated.
thank you in advance
Roger
LOCAL loExcel loExcel = CREATEOBJECT("EXCEL.APPLICATION") loExcel.workbooks.open("C:\dev\BARNS\CLIP\BARCODE.xls") loExcel.visible = .t.
I think Excel365 has not COM interface.
You still need the 32 bit version of Excel installed in order to do any COM automation.
--
rk
-----Original Message----- From: ProfoxTech profoxtech-bounces@leafe.com On Behalf Of roger tremblay Sent: Monday, February 24, 2020 5:25 PM To: profoxtech@leafe.com Subject: Problem Calling in Excel
I have a program which calls in excel (excel 2010) and it works well however with the advent of Excel 365 I can not make the call and get it to work below is the sample code used and it does work on 2010. Any help would be appreciated.
thank you in advance
Roger
LOCAL loExcel loExcel = CREATEOBJECT("EXCEL.APPLICATION") loExcel.workbooks.open("C:\dev\BARNS\CLIP\BARCODE.xls") loExcel.visible = .t.
-- Roger Tremblay Tremblay and Associates Phone 617 308 4793
_______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: https://leafe.com/archives This message: https://leafe.com/archives/byMID/09b86faa-a12b-f5ff-7870-e56976c2ba93@gmail.... ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious. Report [OT] Abuse: http://leafe.com/reportAbuse/09b86faa-a12b-f5ff-7870-e56976c2ba93@gmail.com
FWIW works OK for me, Excel 1908 Click To Run.
Are you using 32-bit Excel?
Hi Roger,
no problem running your code with Excel 365 but read the following article:
Changing File Block settings to enable old Excel file types to be opened as normal https://www.clouddirect.net/knowledge-base/KB0011787/changing-file-block-set...
Error message in Office when a file is blocked by registry policy settings https://docs.microsoft.com/en-us/office/troubleshoot/settings/file-blocked-i...
Opening an XLS file gives the error "You are attempting to open a file type (Excel 2) that has been blocked by your File Block settings in the Trust Center."
Opening ax XLSX file works flawlessly.
Gianni
On Mon, 24 Feb 2020 17:24:57 -0500, roger tremblay rogtrem@gmail.com wrote:
I have a program which calls in excel (excel 2010) and it works well however with the advent of Excel 365 I can not make the call and get it to work below is the sample code used and it does work on 2010. Any help would be appreciated.
thank you in advance
Roger
LOCAL loExcel loExcel = CREATEOBJECT("EXCEL.APPLICATION") loExcel.workbooks.open("C:\dev\BARNS\CLIP\BARCODE.xls") loExcel.visible = .t.