Highlighted
Absent Member.
Absent Member.
854 views

[archive] translation?

[Migrated content. Thread originally posted on 13 September 2007]

Sorry, my mistake. I missed that Font is not a member of the WorkSheet class. So, if you do this:

77 olRange HANDLE OF RANGE.
...
INQUIRE olWrkSh Range("A1:O1") IN olRange.
MODIFY olRange @Font::Size = 8.


I figure it should work
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] translation?

Its late, I'm tired, just wanted to change the font size of cells in Excel. My syntax is obviously wrong - can anyone help?

MODIFY olWrkSh Range("A1")::ColumnWidth = 20.
MODIFY olWrkSh Range("B1:O1")::ColumnWidth = 12.
MODIFY olWrkSh Font::size = 8

Column widths are fine, but it objects to the font::size line.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] translation?

This is probably because Font conflicts with the reserved word FONT in ACUCOBOL-GT.
Try prefix it with @ and you should be all set:
MODIFY olWrkSh @Font::Size = 8
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] translation?

I had tried this before, if I use the following source lines;

INQUIRE olWrkBk Worksheets::Item(1) IN olWrkSh.
MODIFY olWrkSh Range("A1")::ColumnWidth = 20.
MODIFY olWrkSh Range("B1:O1")::ColumnWidth = 12.
MODIFY olWrkSh @Font::Size = 8.

I get the following compile error

SOURCE\GL19EX.cbl, line 454: Undefined data item: @FONT
SOURCE\GL19EX.cbl, line 454: Verb expected, :: found

with MODIFY olWrkSh @Font::Size = 8.

I get the following compile error

SOURCE\GL19EX.cbl, line 454: identifier expected, :: found
SOURCE\GL19EX.cbl, line 454: Verb expected, :: found
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] translation?

And as usual Gisle, it does work. Thank you.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.