AnsweredAssumed Answered

vrf Question about .NET & Panels

Question asked by VRFuser on Jun 2, 2004
Dave, you are a life saver!

I have been going crazy trying to figure out why that wouldn't work.

Thanks,

dwayne

-----Original Message-----
From: Hamilton Dave-P17257 [mailto:Dave.Hamilton@gdds.com]
Sent: Thursday, June 03, 2004 10:22 AM
To: VRF
Subject: [vrf] RE: Vee-Excel Despair

I cannot get it to sort three columns in a certain order.

An example of sorting on column A:
sheet.range("A:J").Sort(sheet.range("A1"),
xlAscending,xlSortLabels,asVariantNull(""),asVariantNull(""),asVariantNu
ll(""),asVariantNull(""),xlGuess,1,"False",xlSortColumns,xlPinYin);

An example of sorting on column A, then B, then C:
sheet.range("A:J").Sort(sheet.range("A1"),
xlAscending,xlSortLabels,sheet.range("B1"),xlAscending,sheet.range("C1")
,xlAscending,xlGuess,1,"False",xlSortColumns,xlPinYin);

Notice that the order is Key1,Order1,Type,Key2,Order2...
When this formula is created by the object browser it has the order
Key1,Order1,Key2,Type,Order2...

This function is documented wrong in VEE as well as Excel. The order the
parameters must be sent to the function is different than what is
documented.

Dave Hamilton
General Dynamics



-----Original Message-----
From: Dwayne Rowland [mailto:drowland@rfmd.com]
Sent: Thursday, June 03, 2004 4:40 AM
To: VRF
Subject: [vrf] RE: Vee-Excel Despair


Jeff,

Thanks for this sort example it has proved very helpful. I have been
pulling my hair out trying to automate the Sort functionality. My
question is, have you been able to get this to work with three columns
instead of just one? I have tried this with just one column and it works
great but I cannot get it to sort three columns in a certain order.

I have tried sending the commands in what appears to be the proper order
but I cannot seem to get it to work. Any help is greatly appreciated.

Thanks,

Dwayne Rowland
RF Micro Devices
7625 Thorndike Rd
Greensboro, NC 27027
phone: 336.678.8185
mobile: 336.601.5265
fax: 336.678.7513
email: drowland@rfmd.com


-----Original Message-----
From: Davis, Jeff [mailto:jeff.davis@cdi-es.com]
Sent: Tuesday, June 01, 2004 11:16 AM
To: VRF
Subject: [vrf] RE: Vee-Excel Despair

I am not sure how to answer this elegantly, so I will answer it the best
way that I can. The VBA code does not always translate 100% to VEE. I am
sure that you are seeing this very phenomena as you are attempting to
work with it.

Let's take the Excel SORT functionality for instance. Below is a VEE
example of how to do a Sort of a range of data. It took my fellow VEE
programmer (Dave Hamilton) approximately 1 week of fiddling around (an
hour or two here and there) to get the sort function to work in VEE.
WHEN you get stuck with VBA code, The best thing to do is use the HELP
that comes with VEE in order to see what the prototypes are for the
functions that you wish to use. If you look at the example item 3 below,
you can see that the sort prototype is expecting 12 parameters to be
passed to it.

Once you have the help info, make a MACRO for what you wish to do using
the macro tool in Excel, Word, or whatever application you are trying to
automate. Then, TRY to get it to work in VEE by trial and error, see
item 2 for the VBA sort macro. Sometimes you get real lucky and
everything works real easy. Other times, you spend a long time trying to
work out the syntax and parameter lists. I don't know what more I can
say, other than that the more you use it, the "easier" it gets to figure
out. The SORT code below took me to the point of frustration, and I had
to punt to Dave to see if he could work it out. He doesn't give up as
easy as me, but it took quite a while to unravel this one.

The most common mistakes are; Syntax, and pass parameter data type
casting.


1. VEE SORT EXAMPLE
--------------------
ExcelApp.range("A:F").Sort(ExcelApp.range("A1"),
xlAscending,xlSortLabels,asVariantNull(""),asVariantNull(""),asVariantNu
ll(""),asVariantNull(""),xlGuess,1,"False",xlSortColumns,xlPinYin);

2. VBA CODE GENERATED BY MACRO
--------------------
Columns("A:F").Select
  Selection.Sort Key1:=Range("A1"), Order1:=xlAscending,
Header:=xlGuess, _
     OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom End
Sub

3. FROM VBA HELP EMBEDDED WITHIN VEE
--------------------
expression.Sort(Key1, Order1, Key2, Type, Order2, Key3, Order3, Header,
OrderCustom, MatchCase, Orientation, SortMethod)

GOOD LUCK TO YOU !!!

P.S. I tried to look at your code, but do not have VEE 7 yet, so no luck
in checking it out

Jeff Davis
Lead Software Test Engineer
CDI Engineering Solutions Aerospace Technologies Embedded Systems and
Electronics
3137 E Elwood # 160
Phoenix, Arizona 85034
Phone: (602)431-4497 (x226)
Cell: (480)330-1431
Fax: (602)431-4435


> -----Original Message-----
> From: Amrik Sekhon [mailto:amrik.sekhon@geeplus.biz]
> Sent: Tuesday, June 01, 2004 04:36 AM
> To: VRF
> Subject: [vrf] Vee-Excel Despair
>
>
> Hi All
>
> I am in despair. I need to know how to communicate with excel from
> vee.
>
> I can send my data across,
> I can average my data,
> I can draw simple lines charts (but not the one i want)
>
> I keep getting syntax error problems, or cannot assign values.
>
> What i need is some reference as to what kind of VB/VBA/ActiveX syntax

> is used. The VBA generated by excel macro is no good, it does not
> work, and the books i have seen all seem to be based on this syntax. I

> have been reading MS windows developers hanbook, VB.net, VB6, activeX
> controls, excel 95 solutions (old i know but, its all i have), VBA for

> dummies (i feel like one
> now) and i am left confused, cause they all say the same thing, but it

> is not the same as vee knows it, WHY????
>
> All i am trying to do at the moment is draw a simple XY line chart
> using two colums of data and i have been stuck on this for a week,
> with vee confusing me more and more.
>
> I have attached the code if anyone is generous enough to have a quick
> look, but mainly i need to know the books/reference.
>
> I have looked at the examples provided with vee and even tried using
> the code, but when used with the chart i am trying to use it fails
> miserably.
>
> Can all excel chart types be invoked from vee, or is this my
> problem???
>
> I am running : vee pro 7, WIN XP, Excel2000, activeX automation
> library 11
>
> All despaired out, help
>
> Amrik
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

---
You are currently subscribed to vrf as: drowland@rfmd.com To subscribe
send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to
"leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".



---
You are currently subscribed to vrf as: Dave.Hamilton@gdds.com To
subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to
"leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".

---
You are currently subscribed to vrf as: drowland@rfmd.com To subscribe
send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to
"leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".



---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes