Sub PickItem(myItem As String, myLength As Long)
'For next loop to "walk" down the screen and read each row
For i = 3 To 27
'This reads a row and sees if the passed myItem is in row. If so it finds what 
column the menu item started.
j = InStr(View(Row:=i, Col:=1, Length:=80), myItem)
If j <> 0 Then
'If the item is found, then read to the left of it and grab the menu number, 
enter it and get out of the routine to proceed to greater things!
temp = Trim(View(Row:=i, Col:=j - myLength, Length:=myLength))

temp = StrReplace(temp, "(", "")
temp = StrReplace(temp, ")", "")
Enter Trim(temp)
Exit Sub
End If
Next i
MsgBox "Menu Item not found"
'If the script gets here then there was a problem, you probably don't want to 
just pop-up
'a message box
End Sub

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Thom C. Blackwell
Sent: Wednesday, July 11, 2007 9:33 AM
To: [email protected]
Subject: RE: [Talk] PickItem Question


Greetings,
Ah I vaguely remember this as I was the one who wrote it - and it's a
classic example of "I should have gotten the routine script for the script
library"...
Can you send me the actual PickItem sub routine - and I can read it and let
you know what was going on in my brain at the time.
Regards,
Thom


Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com
 
LEGAL NOTICE Unless expressly stated otherwise, this message is confidential
and may be privileged. It is intended for the addressee(s) only. Access to
this E-mail by anyone else is unauthorized. If you are not an addressee, any
disclosure or copying of the contents of this E-mail or any action taken (or
not taken) in reliance on it is unauthorized and may be unlawful. If you are
not an addressee, please inform the sender immediately, then delete this
message and empty from your trash.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chen, Scott C
Sent: Wednesday, July 11, 2007 11:44 AM
To: Boston WorkStation Group (E-mail)
Subject: [Talk] PickItem Question

Does anyone know whether the myLength field refers to the myItem Length or
the option length.
The notes are not very clear on this.  

Sub PickItem(myItem As String, myLength As Long)

End Sub


Thanks,

Scott Chen
Database Developer
Providence Health & Services








DISCLAIMER:
This message is intended for the sole use of the addressee, and may contain
information that is privileged, confidential and exempt from disclosure
under applicable law. If you are not the addressee you are hereby notified
that you may not use, copy, disclose, or distribute to anyone the message or
any information contained in the message. If you have received this message
in error, please immediately advise the sender by reply email and delete
this message.





DISCLAIMER:
This message is intended for the sole use of the addressee, and may contain 
information that is privileged, confidential and exempt from disclosure under 
applicable law. If you are not the addressee you are hereby notified that you 
may not use, copy, disclose, or distribute to anyone the message or any 
information contained in the message. If you have received this message in 
error, please immediately advise the sender by reply email and delete this 
message.

Reply via email to