Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Old lotus macro

Posted on 2004-04-01
Medium Priority
Last Modified: 2008-09-25

I've been asked to decipher a number of lotus macros authored in lotus 1-2-3

It's the standard joke.  The macros have been relied upon so long, that no one knows how
to generate the report without it. (and of course the original author is long gone and
didn't bother to document anything)

Here's a smattering of code.  Could someone tell me somthing about it?
Does it look like someone wrote it? or did someone just hit the record button?

I was told that it was written with a old version of Lotus 1-2-3 (v3.1),
but the file extensions are .wk4 's and run in Lotus 1-2-3 v5a

\0      {GOTO}AAA~{D 4}                              
      {APP-STATE "maximize"}                              
\G      {HOME}{GOTO}BBB~                              
      {getlabel "INPUT AS OF DATE",FILE}                              
TEST      {LET d:A29,+"I:\015RPTS\sf"&FILE}                              
I:\015RPTS\sfTEST      /fccna3..i5000~{ESC}{ESC}{FULL}~                              
      {EDIT-GOTO "B:G2";;"RANGE"}                              
      {EDIT-GOTO "B:D2";;"RANGE"}                              

------------ snip ------------------
Question by:Marketing_Insists
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 45

Accepted Solution

patrickab earned 1200 total points
ID: 10749943
\0                                           This is an automacro that executes when the file is opened
\0     {GOTO}AAA~{D 4}           Go to named range AAA and the move down 5 cells          
     {APP-STATE "maximize"}     Maximise the window for the applicaton                  
\G     {HOME}{GOTO}BBB~               Go to A1 in the sheet and then go to range named BBB          
     {PANELOFF}{WINDOWSOFF}       Turn the lotus command line off and turn off the screen up-date whilst the macro is running - it speeds up the macro
     /WGDOUDQ                         This line turns off the undo facility
     /FDg:\lad~                          Change directory to g:\lad
     /REC:C3.C:J599~                 Range erase C:A2 to J599
     /REB:A2.B:J4500~                Range erase B:A2 to BJ4500        
     {GOTO}COUNTER3~             Go to range named COUNTER3            
     1~                                       Enter the value 1
     {GOTO}COUNTER9~             Go to range named COUNTER9        
     0~                                       Enter the value 0
     {GOTO}C6ENTRYA~              Go to range named C6ENTRYA
     +B:A2="LN"#OR#B:A2="BB"#OR#B:A2="BR"#OR#B:A2="LC"#OR#B:A2="SB"~     - sorry don't understand this line                    
     {GOTO}C6ENTRY~                Go to named range C6ENTRY
     {GOTO}C:C3~                         Go to C:C3
     /RNCTEMP9~~                        Range Name Create TEMP9
     {GOTO}B:A2~                         Go to B:A2
     {getlabel "INPUT AS OF DATE",FILE}                 This is meant to open a dialogue box and allow the user to enter some information but it has been written incorrectly.        
TEST     {LET d:A29,+"I:\015RPTS\sf"&FILE}      Enters I:\015RPTS\sf and the adds FILE to to the string - I assume it is to be able to give a new file name.  The word TEST at the beginning of the line doesn't make sense at the moment.                    
I:\015RPTS\sfTEST     Not sure how this works in the macro
/fccna3..i5000~{ESC}{ESC}{FULL}~          File combine copy named range A3 to i5000 - not usre what the FULL means        
     {EDIT-GOTO "B:G2";;"RANGE"}     Goto and edit range B:G2 by selecting the whole  RANGE - seems a rather unnecessary thing to do!
     /WIC~                     Insert a column    
     @IF(F2="AUD",1/H2,H2)~                If A2=AUD put 1/H2 else put H2        
     /C~.{END}{D}{L}{END}{U}{R}~        Go to the end of the column by going to the bottom of the spreadsheet, moving left one column, going up to the top to the column and the moving one column to the right                    
     /RV{END}{D}~{R}~      Change the entries in the highlighted area to values.                  
     /WDC~              Delete the column containing the cursor          
     /WIC~                Insert a column        
     @IF(F2="EUR",1/H2,H2)~      If F2=EUR then enter 1/H2 else enter H2
     /C~.{END}{D}{L}{END}{U}{R}~   Copy the highlighted range                      
     /RV{END}{D}~{R}~                    Change the entries of the highlighted range to values instead of formulas    
     /WDC~                                      Delete a column
     /RFF5~{END}{D}~                      Format the highlighted range to 5 decimal places  
     {EDIT-GOTO "B:D2";;"RANGE"}    Go to and edit B:D2
     /WIC~                                       Insert a column


Can't imagine this helps at all but there you go! Good luck..

LVL 45

Expert Comment

ID: 10751278
Oh to answer your question - it was almost definitely written by hand. It would not be possible to put in the logical stuff by just recording a macro. It is possible to record a large part and then edit it but somehow I doubt that was how it was done.

By the way the following:

 +B:A2="LN"#OR#B:A2="BB"#OR#B:A2="BR"#OR#B:A2="LC"#OR#B:A2="SB"~     - sorry don't understand this line

It clear as to its logic but I don't understand what it is really doing. I think it's a problem of not knowing the context. The next line attempts to edit the line result of the line above if the B:A2 contains certain characters. The line is:


When extracted and run as mini macro these two lines don't appear to do very much. Try it and you'll see.

Now the line:

TEST     {LET d:A29,+"I:\015RPTS\sf"&FILE}

Is it quoted by you slightly ambiguously? I think you will find that TEST is a named range to the left of {LET d:A29,+"I:\015RPTS\sf"&FILE}. If it isn't then I don't know how it works!


Author Comment

ID: 10768001
Thanks!  I now have hope.

Though can you believe their is another 2000 lines of this?

Any way, your input gives me a nice head start
LVL 45

Expert Comment

ID: 10769465
Many thanks for the points and the A grade.

Years ago I bought a very useful book on Lotus123 called "Using Lotus 123" published by Que in believe it or not 1985 -  I bought my copy almost exactly 21 years ago in 1987! Specifically it is ISBN 0-88022-243-3 and is written by Geoffrey T LeBlond and Douglas Ford Cobb. I reckon you might be able to find on Amazon for relatively little as it is so out of date or perhaps something a bit more up-to-date as the macro language changed as the newer editions of Lotus 123 became available.

2000 lines is a lot and very tiresome indeed.

I have no idea about your application but I would care to bet that if you re-thought it and put it into a database such as Lotus Approach which has acceptable reporting tools (considering how inexpensive it is) you might find the whole application much easier to re-implement.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question