expertenaustausch > comp.* > comp.office-pakete.lotus-smartsuite

Gary F. Pitel (03.12.2006, 19:08)
I am in need of help for Lotus 123. I have a database of names and I
want to create a macro to go to a particular letter in the database. For
example just like it does in Windows Explorer when you hit the H key it
will go to the start of the folders or directories that start with the
letter H. Please any help will be greatly appreciated. If this forum has
no lotus 123 macro help than can someone tell where I can find Lotus 123
help like a forum. Thanks
Martin Holz (03.12.2006, 20:37)
Gary F. Pitel wrote:

> I am in need of help for Lotus 123. I have a database of names and I
> want to create a macro to go to a particular letter in the database. For
> example just like it does in Windows Explorer when you hit the H key it
> will go to the start of the folders or directories that start with the
> letter H. Please any help will be greatly appreciated. If this forum has
> no lotus 123 macro help than can someone tell where I can find Lotus 123
> help like a forum. Thanks


Notice: This is mainly a german language group.

You may find appropriate english help at: where you have
to register (for free).

To your question:
123 isn't really comfortable for use as a database. You might want to save
your 123-file in dbaseIV-format (.dbf) and open it using Lotus Approach.
Lotus Approach is part of the Smartsuite, so it should be available.
If you open your database using Approach you'll have all the advantages of a
real database - e.g. searching for records.

This will be much(!) better and even easier than "pimping" 123 via macros or
scripts.

Greetings
Martin
Gary F. Pitel (03.12.2006, 21:11)
Martin Holz wrote:

[..]
> scripts.
> Greetings
> Martin

Thanks Martin. However, it is a ledger account that I use for writing
checks and all of the accounts that checks are written for are arranged
alphabetically from A to Z. Right now I am using V lookup and I am using
numbers in the left most column but the list has gotten so large that I
want to be able to locate a name easier than page by page looking.
Besides the number in the left most column the other columns are the
name in column 2, column 3 is the classification and in column for is a
code number for grouping in the ledger, and in the last column is the
amount of the check. This is by means of a macro put into a check and it
prints the check. So I guess I should have just said a list of names
sorted alphabetically. Here is an example: 3
AARP BANK ONE Personal 401 102 Amount
If you can help me here that would be great. Thanks
Martin Holz (05.12.2006, 15:45)
Quick'n'Dirty (not bullet proof!):

This script opens an input dialog. In this dialog you type in a letter.
After clicking OK or pressing ENTER the first matching cell gets selected.

The script has to reside in "globals" and can be started either by clicking
a smarticon or a keyboard shortcut.

,---
Sub AlphabeticSearch
Dim myInput As String
myInput$ = Inputbox ("Please give ONE letter to search for")

Dim found As Integer
found = False

' Define Area to search in
Dim searchArea As Range
Set searchArea = [A:A1..A:A26]

' Search ...
Forall myCell In searchArea.Cells
If Mid$(myCell.Contents, 2,1) = myInput Then
found = True
myCell.select
Exit Sub
End If
End Forall
End Sub
`---

Notice: For testing purposes i just defined a very small range (A1..A26).
You need to increase this to your needs (e.g. A1..A65536).

HTH
Martin
Gary F. Pitel (06.12.2006, 04:35)
Martin Holz wrote:
[..]
> You need to increase this to your needs (e.g. A1..A65536).
> HTH
> Martin

That's great Martin and I thank you very much for your help.
Gary
Martin Holz (06.12.2006, 10:21)
Gary F. Pitel wrote:

> Martin Holz wrote:


Oh ... as i see now there is still the "found" variable ... this is not
necessary in this script.
It's safe to delete the lines with "found".
I tried to loop through the cells by "Do ... While ... Loop", therefore the
found variable was needed. But that method stopped at the _last_ entry -
not at the first.

Greetings
Martin
Ähnliche Themen