473,748 Members | 2,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Find Existing Value in Array of Array

Ros
Peeps,

I need help with trying to find a value in array of arrays.

Public Module myModule
Private Site_Access() As Array
Property Set_SA()
Get
Return Site_Access
End Get
Set(ByVal value)
On Error GoTo Handler
ReDim Site_Access(0)
Site_Access(Sit e_Access.Find(S ite_Access, value(0))) = value
Handler:
Select Case Err.Number
'.... goes to sub procedure code to copy and reassign array
if does not exist
End Select
End Set
End Property
End Module

the values for "value" consist of string in array:

value(0)="Login _ID"
value(1)="http://testsite/admin/"
value(2)="http://testsite/userform/"

i do not want to use a loop or while statement.

I tried the above, but no luck. Please help.
Thanks in advance
Ros
Jul 12 '06 #1
2 2004
Ros
Public Module myModule
Private Site_Access() As Array
Property Set_SA()
Get
Return Site_Access
End Get
Set(ByVal value)
On Error GoTo Handler
Dim intC As Integer
1:
If IsArray(Site_Ac cess) Then
Site_Access(Sit e_Access.Find(S ite_Access, value(0))) = value
Else
ReDim Site_Access(0)
Site_Access(0) = value
Resume 1
End If
Handler:
Select Case Err.Number
Case Is = 91

'.... goes to sub procedure code to copy and reassign
array if does not exist
End Select
End Set
End Property
End Module

Sorry peeps,

did not mean to include the "ReDim" in the wrong line. above is the actual
code.
Ros
Jul 12 '06 #2
Ros
Never mind peeps, i figured it out... thanks anyways. used the following code
Site_Access.Fin d(Site_Access, AddressOf Return_String)
Ros
"Ros" wrote:
Peeps,

I need help with trying to find a value in array of arrays.

Public Module myModule
Private Site_Access() As Array
Property Set_SA()
Get
Return Site_Access
End Get
Set(ByVal value)
On Error GoTo Handler
ReDim Site_Access(0)
Site_Access(Sit e_Access.Find(S ite_Access, value(0))) = value
Handler:
Select Case Err.Number
'.... goes to sub procedure code to copy and reassign array
if does not exist
End Select
End Set
End Property
End Module

the values for "value" consist of string in array:

value(0)="Login _ID"
value(1)="http://testsite/admin/"
value(2)="http://testsite/userform/"

i do not want to use a loop or while statement.

I tried the above, but no luck. Please help.
Thanks in advance
Ros
Jul 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1767
by: elyob | last post by:
I'm just rewriting some backend management pages, in fact rewriting the whole database too. One of these pages has a simple HTML form to edit existing rows. I don't want to populate the form beforehand with all existing data. I just want to check which of the 20 fields have changed and update the data accordingly. Before (I wrote the script years ago, forgive me!), I just had a check whether any data in each field and each had its own...
108
6438
by: Bryan Olson | last post by:
The Python slice type has one method 'indices', and reportedly: This method takes a single integer argument /length/ and computes information about the extended slice that the slice object would describe if applied to a sequence of length items. It returns a tuple of three integers; respectively these are the /start/ and /stop/ indices and the /step/ or stride length of the slice. Missing or out-of-bounds indices are handled in a manner...
8
74890
by: J. B. Moreno | last post by:
What's the best (i.e. fastest) way to find out if an array contains a given value? Other than looping, the only way I know to do it is to use an associative array/hash instead.... Is there a better/faster way? I.e if I have a list of names, what's the best way to find out if the aray contains "jane"? --
25
7638
by: Yves Glodt | last post by:
Hello, if I do this: for row in sqlsth: ________pkcolumns.append(row.strip()) ________etc without a prior:
11
3610
by: Sontu | last post by:
Consider the following code: int main(void) { char buffer; func(buffer); } void func(char *bufpas) {
13
12321
by: mike | last post by:
I have ListArray with number in Eg: 1, 1.456, 2.43, 4, 6.78 next i have a decimal variable containing one number EG: 1.786 Could someone please tell me how i find the "closest match" number below the decimal variable from the arraylist. Thanks ever so much in advance
4
2197
by: Arjen | last post by:
Hi, I need to add this inside an array: 1 3 2 4 3 2 4 5 5 1 I think of using this:
3
2679
by: Lars Grobe | last post by:
Hi, first hello, I am new to the list, and I guess my question will show that clearly. I want to use some vector operations (at the moment altivec) in existing code. It is a raytracing-based application, and for now, I would like to replace the operations on my data type vect3 (which is a float array) by operations on a vector float. The vect3 is simply a typedef to an array of floats so far.
4
9985
by: raylopez99 | last post by:
I would like to know if there's a quick "Linq" way to find the index of an array having a particular value. I can do this the long way by sequential iteration, but would like to know if there's a shortcut. Specifically, you have an Array, say an array of Ints. You have a maximum value, i.e. int someValue = Array.Max(); and you would like to know which ith cell of the Array holds this value. How to do this without iterating the entire...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2783
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.