Skip to main content

[archive] Excel: PageSetup.Zoom

  • December 16, 2008
  • 4 replies
  • 0 views

[Migrated content. Thread originally posted on 16 December 2008]

Cool! I need to remember that.

4 replies

[Migrated content. Thread originally posted on 16 December 2008]

Cool! I need to remember that.
Hello,

i want to deactivate the PageSetup.Zoom Property in Excel, because only then the FitToPages Property are activated.

When i look at MSDN i can set the ZoomValue from 10 to 400 and this works.
To deactivate i have to set the Zoom value to false but how?

Excample

           move    30 to xls-integer.

           modify  xls-sheet @PageSetup::@Zoom = xls-integer.
           modify  xls-sheet @PageSetup::@FitToPagesWide = 1.
           modify  xls-sheet @PageSetup::@FitToPagesTall = 999.


with this i set the zoom-value to 30% and it works. 0 doesn't work like description in MSDN that 10 is the lowest possible value.

When i set the "@Zoom = false" i can't combile the programm


artbew2.cbl, line 3601: identifier expected, FALSE found
artbew2.cbl, line 3601: Wrong number of parameters: 1 expected, 0 found
artbew2.cbl, line 3601: Verb expected, FALSE found


can someone help?

David

[Migrated content. Thread originally posted on 16 December 2008]

Cool! I need to remember that.
false is not a reserved word with ACUCOBOL-GT. As the target is a variant, I presume a cast may be required. Have you tried this:

modify xls-sheet @PageSetup::@Zoom = 0 AS VT-BOOL

VT-BOOL is defined in activex.def.

[Migrated content. Thread originally posted on 16 December 2008]

Cool! I need to remember that.
it works :)

thanks

[Migrated content. Thread originally posted on 16 December 2008]

Cool! I need to remember that.
it works :)

thanks