One of the easiest ways to solve a problem using 123 scripting language is to use the "Record Script" feature and to perform the action you are trying to emulate.
If there is syntax for the action you performed a script will pop-up with the proper syntax. For instance, in response to the Lotus 123 column width thread (SMessier), my suggestion is to open the workbook. Select Edit -> Scripts & Macros -> Record Script. You will be prompted to name the script. Name it ColumnWidth and press "Ok".
You are now in record mode. Most of the actions you perform will be recorded as a script. Go to the column you want to adjust and double click on the top of the column to adjust it to the maximum width. Press the "Stop" button to stop recording.
A script window will pop-up with the following.
Sub ColumnWidth
[Window 1].Activate
[A:C1..A:C65536].FitWidest
End Sub
That's all there is to it! Now you know the command you want to use! Once you are more familiar with the scripting language you will find out that some of the lines in the script are unnecessary. Simply delete these lines.
Another great feature is "Record at Cursor". This is usefully once you have already created a script and you are stumped. Go to your script, within the script select where you want to start recording, then click on Script -> Record at Cursor. You are once again in record mode. Perform your actions and press stop. Your script will have a new addition.
(Note: the record feature doesn't include any looping procedures, you will have to write them yourself.)
Happy scripting!!!!
BBord
If there is syntax for the action you performed a script will pop-up with the proper syntax. For instance, in response to the Lotus 123 column width thread (SMessier), my suggestion is to open the workbook. Select Edit -> Scripts & Macros -> Record Script. You will be prompted to name the script. Name it ColumnWidth and press "Ok".
You are now in record mode. Most of the actions you perform will be recorded as a script. Go to the column you want to adjust and double click on the top of the column to adjust it to the maximum width. Press the "Stop" button to stop recording.
A script window will pop-up with the following.
Sub ColumnWidth
[Window 1].Activate
[A:C1..A:C65536].FitWidest
End Sub
That's all there is to it! Now you know the command you want to use! Once you are more familiar with the scripting language you will find out that some of the lines in the script are unnecessary. Simply delete these lines.
Another great feature is "Record at Cursor". This is usefully once you have already created a script and you are stumped. Go to your script, within the script select where you want to start recording, then click on Script -> Record at Cursor. You are once again in record mode. Perform your actions and press stop. Your script will have a new addition.
(Note: the record feature doesn't include any looping procedures, you will have to write them yourself.)
Happy scripting!!!!
BBord