Function To Return Info From As400 Database
Hello everyone, I have this function : Function ni(ct1 As String) Dim ct2, i 'Create some variables Dim ni_descr Set ni = CreateObject("Scripting.Dictionary") ni.Add "A", "A Info" 'Add some keys and items ni.Add "B", "B Info" ni.Add "C", "C Info" ni = ni.keys ni_descr = ni.items 'Get the items For i = 0 To ni.Count - 1 'Iterate the array ct2 = claim_key(i) ni_descr = ni_descr(i) If ni= ct1 Then ni = ni_descr Exit For End If Next End Function If I call this function in my worksheet cell Range B2 by enterin formula "= ni(A2)" where A2 contains "A", it will give me "A Info". I works perfectly ok. However, it is quite very limited and I want a similar function t return information from our AS400 system database containing a hug data that is continously being updated. I tried SQL.Request functions, etc, etc, to no avail. Would appreciate any idea or help. Thanks Robi -- Robin Flore ----------------------------------------------------------------------- Robin Flores's Profile: http://www.excelforum.com/member.php...fo&userid=1557 View this thread: http://www.excelforum.com/showthread.php?threadid=27133 |
All times are GMT +1. The time now is 05:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com