Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with Lotus 1-2-3 Macro Command Equivalents...

16 views
Skip to first unread message

Thomas Ogilvy

unread,
May 11, 1999, 3:00:00 AM5/11/99
to
Since your not getting a lot of bites, perhaps you should specify what you
want to do. Everyone here doesn't know 1-2-3 programming, so putting a
1-2-3 macro up for people to decipher may not be the best approach.

Regards,
Tom Ogilvy

Kerry B. Mackey wrote in message <3737A49A...@pickapart.com>...
I have been able to download the MS Tech Support Application Note
12/96-WE1277 entitled "Visual Basic for Applications Equivalents for Lotus
1-2-3 Macro Commands". This is a great source of information but I am having
a problem with the automation of a print macro developed in Lotus 1-2-3
v5.0. Here is the Lotus print macro (highlighted areas = Lotus range names):
ZSTART (Main Macro)
{Choose-Item ZALL;ZFLAG;"Highlight desired selection:...";"Main Print
Menu"}

{IF @cell("type";ZFLAG)="b"}{quit}
{IF ZFLAG=0}{Branch ZALLPR}
{IF ZFLAG=1}{Branch ZHIST}
{IF ZFLAG=2}{Branch ZSTATS}
{IF ZFLAG=3}{Branch ZASSUMP}
{IF ZFLAG=4}{Branch ZCIP}
{IF ZFLAG=5}{Branch ZPROJ}
{IF ZFLAG=6}{Branch ZBRK}
{IF ZFLAG=7}{Branch ZMISC}

ZALL (Main Print Menu)
0 PRINT ALL SELECTIONS
1 HISTORICAL
2 STATISTICS
3 ASSUMPTIONS
4 CAPITAL IMPROVEMENTS
5 PROJECTIONS
6 MONTHLY ANALYSIS
7 MISCELLANEOUS

ZFLAG 1 (Selection = HISTORICAL)

ZHIST (Historical Info Print Menu)
{WINDOWSOFF}
{CHOOSE-MANY ZA,ZFLAG,"Enter selection(s):...","Historical Print Menu"}
{IF ZFLAG=0}{BRANCH ZSTART}
{IF ZAF1=1}{ZA1}
{IF ZAF2=1}{ZA2}
{IF ZAF3=1}{ZA3}
{IF ZAF4=1}{ZA4}
{IF ZAF5=1}{ZA5}
{WINDOWSON}

1 ZHIST (Historical Info Print Menu)
ZA (lists the following menu choices)
A - Print All Selections
B - Print Sales Information
C - Print Cost of Sales Information
D - Print Admin and Misc Inc/Exp
E - Print Inventory Reconciliation

ZAF2 (Print Sales Information Option) = 1

ZA2 (Print Sales Information Option)
{INDICATE "Printing Sales Information"}
{SET "PRINT-HEADER-LEFT-TEXT";""}
{SET "PRINT-HEADER-CENTER-TEXT";""}
{SET "PRINT-HEADER-RIGHT-TEXT";""}
{SET "PRINT-FOOTER-LEFT-TEXT";"@ +"}
{SET "PRINT-FOOTER-CENTER-TEXT";""}
{SET "PRINT-FOOTER-RIGHT-TEXT";"^"}
{SET "PRINT-SIZE";"FIT-ALL"}
{SET "PRINT-ORIENTATION";"PORTRAIT"}
{SET "PRINT-MARGIN-TOP";"0.5in"}
{SET "PRINT-MARGIN-BOTTOM";"0.5in"}
{SET "PRINT-MARGIN-RIGHT";"0.5in"}
{SET "PRINT-MARGIN-LEFT";"0.5in"}
{SET "PRINT-CENTERED";"HORIZONTAL"}
{SET "PRINT-WORKSHEET-FRAME";"OFF"}
{SET "PRINT-GRID-LINES";"OFF"}
{SET "PRINT-DRAWN-OBJECTS";"OFF"}
{SET "PRINT-TITLES-CLEAR";"COLUMNS"}
{SET "PRINT-TITLES-ROW-RANGE";"HISTHDR"}
{SET "PRINT-RANGE";HISTSLS}
{PRINT ;1;9999;1;1}
{SET "PRINT-TITLES-CLEAR";"COLUMNS"}
{SET "PRINT-TITLES-CLEAR";"ROWS"}
{INDICATE}


This print menu has many different selections to choose from - the tech
support application note says to use "userforms" for the {Choose-Item},
{Choose-Many} Lotus macro command language. Well, this is great, but how do
you develop and utilize (automate/activate) the userforms in a print macro
using visual basic in Excel '97? I have tried to establish the userform, but
cannot figure out how to activate the macro commands from the userform. How
does the macro call the userform? Do you record the macro commands and
somehow link/reference the userform to call several different print options?
What if you wanted to have the ability to select more than one print option
from the userform? Is this the right direction to be taking for macro
automation? HELP...

I am also looiking for help with the {IF
@cell("type";ZFLAG)="b"}{quit}listed above as well.

Any help would be greatly appreciated. Thank you.

Regards,
Kerry Mackey


Kerry B. Mackey

unread,
May 18, 1999, 3:00:00 AM5/18/99
to Thomas Ogilvy
In response to the macro programming problem I have been trying to
figure out in Visual Basic. I have numerous print ranges in several
sheets of the workbook. I would like to create userforms(?) that would
allow you to select upon involving the print macro: (1) the sheet of
choice and then, (2) the desired print ranges. The initial userform
would allow you to choose only one option (the different sheets ex:
Revenue, OandM, CIP, etc) and the second userform would allow you to
select many of the different print ranges (ex: Range1, Range2,
Range3,etc.), format the page layout (orientation, margin settings,
borders, titles, etc.), and then print the page of the sheet selected in
the 1st user form (cancel button would be available on this userform
enabling the user to return to the previous menu of selections). Upon
completing the desired print outs from the selected sheet, the macro
will return to the first userform enabling the user to select another
sheet if desired or quit/cancel the macro.

Thank you for any assistance that you may provide.

Regards,
Kerry Mackey

vcard.vcf
0 new messages