Author | Topic: VB Question | |
---|---|---|
Donald R. Keating | VB Question on Mon, 02 Jun 2008 21:03:14 -0400 Hi Y'all, In VB manual I find this example. Worksheets("Sheet1").Move _ after:=Worksheets("Sheet3") What is the Xbase++ equivalent of the space underscore space following Move? Thanks. >don< | |
Hannes Ziegler | Re: VB Question on Tue, 03 Jun 2008 04:13:06 +0200 Don, I'm not a VB expert and I stand corrected for every better explanation: _ is the line continuation character in VB (like ; for Xbase++) > Worksheets("Sheet1").Move _ > after:=Worksheets("Sheet3") > My first guess would be this: oWS1 := oExcel:Worksheets("Sheet1") oWS3 := oExcel:Worksheets("Sheet3") oWS1:move( oWS3 ) Again, I'm neither a VB nor an Excel expert, but this is how I would translate the VB code to XBase++ HTH, -- Hannes "Donald R. Keating" <DonK@dbscompay.com> schrieb im Newsbeitrag news:ezea1d4cjdoo$.sfchaihy28ub$.dlg@40tude.net... > Hi Y'all, > > In VB manual I find this example. > > Worksheets("Sheet1").Move _ > after:=Worksheets("Sheet3") > > What is the Xbase++ equivalent of the space underscore space following > Move? > > Thanks. > >>don< | |
Donald R. Keating | Re: VB Question on Tue, 03 Jun 2008 06:48:20 -0400 Thanks Hannes, Makes sense. >don< On Tue, 03 Jun 2008 04:13:06 +0200, Hannes Ziegler wrote: > Don, > > I'm not a VB expert and I stand corrected for every better explanation: > > _ is the line continuation character in VB (like ; for Xbase++) > >> Worksheets("Sheet1").Move _ >> after:=Worksheets("Sheet3") >> > > My first guess would be this: > > oWS1 := oExcel:Worksheets("Sheet1") > oWS3 := oExcel:Worksheets("Sheet3") > oWS1:move( oWS3 ) > > Again, I'm neither a VB nor an Excel expert, but this is how I would > translate the VB code to XBase++ > > HTH, | |
Ron Pinkas | Re: VB Question on Wed, 04 Jun 2008 04:33:51 -0700 > My first guess would be this: > > oWS1 := oExcel:Worksheets("Sheet1") > oWS3 := oExcel:Worksheets("Sheet3") > oWS1:move( oWS3 ) The ignores the "after:= ..." portion, which is a VB way of passing a NAMED ARGUMENT. In this sample the call to the Move() method will pass the argument into the paramater named "after". IIRC this is the 2nd argument of the Move Method but I'm not sure. IIRC the same question was answered on this NG not long ago. Ron | |
Hannes Ziegler | Re: VB Question on Wed, 04 Jun 2008 14:24:06 +0200 >> My first guess would be this: >> >> oWS1 := oExcel:Worksheets("Sheet1") >> oWS3 := oExcel:Worksheets("Sheet3") >> oWS1:move( oWS3 ) > > The ignores the "after:= ..." portion, which is a VB way of passing a > NAMED ARGUMENT. In this sample the call to the Move() method will pass the > argument into the paramater named "after". IIRC this is the 2nd argument > of the Move Method but I'm not sure. IIRC the same question was answered > on this NG not long ago. > > Ron Absolutely correct, I just looked up :move() in the IDL file of Excel HRESULT Move( [in, optional] VARIANT Before, [in, optional] VARIANT After, [in, lcid] long lcid); I think Xbase++ doesn't support named arguments, like VB does. The sheet to move "after" must be passed as second argument: oWS1:move( NIL, oWS3, LOCALE_NEUTRAL ) Regards, -- Hannes |