List attributes (fields) of a shapefile and SUM the selected fields

744
4
05-28-2011 06:09 AM
MeghanAlexander1
New Contributor
Dear All,

I have 2 listboxes listing the fields in a shape file (the same shape file in fact)- the user will select a field from each. Then, I want the user to be able to select a command button which adds these 2 fields together and displays the result. I think this will need a cursor to correctly label the selected field (row) with the rows value - but how?

(vba arcgis 9.3)

Please help!

Meg
0 Kudos
4 Replies
shivagugila
New Contributor III
Dim A as integer
Dim B as integer
Dim C as Integer

A = Listbox1.object
B = Listbox2.object

C = A+B

msgbox C

Regards,
Shiva
0 Kudos
MeghanAlexander1
New Contributor
Please can someone reply to this - i'm new to VB but i'm sure this is relatively simple. I just don't know how to do it myself!

If you know the answer please reply...

Best, meg
0 Kudos
Dr__Ajay_SinghTomar
New Contributor
Hi,

Frist, Populate the shape fields in both listbox. When you select the frist list box (get the selected item name and index). same case do with the another list box. finally add the both string and display any where (may be textbox).

Bye
0 Kudos
MeghanAlexander1
New Contributor
Thank you - do you have a code that I can use or pointers for me? (i really am quite new)

Meg
0 Kudos