Rexx OLE PageBreak

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Rexx OLE PageBreak

Jean-Louis COMBEAU
Hi,
Is there anyone having experience with VBA translation to Rexx?

I need to put a pagebreak in an Excel sheet to have a correct presentation

in VBA the proper expression is : ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell

how should we code Add Before:=ActiveCell ?
THanks for your help
Jean-Louisj
Jean-Louis COMBEAU
Reply | Threaded
Open this post in threaded view
|

Re: Rexx OLE PageBreak

Jean-Louis COMBEAU
Thanks to Jon Wolfers who sent me the solution and more particularly the methodology "to translate" the options of VBA to OORexx.
Here is his message:
-------------------------------------------------------------------------------
Hi Jean-Louis

VBA allows passing be parameter name, whereas ooRexx only allows positional parameter passing.
So you have to look up the parameters for the Add method, find the position of the parameter named 'Before' and supply your activecell variable in that position.

Google leads us here where we see that Before is the name of the first (and only) parameter, so the VBA
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell

becomes

ActiveCell=objWorkSheet~Range('A5:A5')
ActiveWindow~SelectedSheets~HPageBreaks~Add(ActiveCell)Hi Jean-Louis

VBA allows passing be parameter name, whereas ooRexx only allows positional parameter passing.
So you have to look up the parameters for the Add method, find the position of the parameter named 'Before' and supply your activecell variable in that position.

Google leads us here where we see that Before is the name of the first (and only) parameter, so the VBA
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell

becomes

ActiveCell=objWorkSheet~Range('A5:A5')
ActiveWindow~SelectedSheets~HPageBreaks~Add(ActiveCell)
-------------------------------------------------------------------------------
Jean-Louis COMBEAU