Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign Values to Map (wmf file)

Status
Not open for further replies.

fredka

Technical User
Jul 25, 2006
114
0
0
US
I imported a county map of New Jersey and I am trying to populate the values on the map of each county. I have a listing of countys with a number

County Members
Atlantic 2179
Bergen 22209

I imported a wmf file and have all the counties named individually on the map.

There is a great tutorial that I found that shows you how to color the map based on the values, however, I also want to have the values displayed on the map.

When I right click on each county individually, there is no option to add text.

Any help would be greatly appreciated!!!

Thanks!!!
 
Forgot to mention that I am talking about excel.
 
There is a great tutorial that I found that shows you how to color the map based on the values
... and have you got that part working?

If so, show us your code ( if it's done via VBA ).

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
Thanks for responding Glenn. Here is the code:

For i = 25 To 45
Range("actcounty").Value = Range("Data!C" & i).Value
ActiveSheet.Shapes(Range("actcounty").Value).Select

Selection.ShapeRange.Fill.ForeColor.RGB = Range(Range("ActCountyCode").Value).Interior.Color
'Selection.ShapeRange.Characters.Text = "test"
Next i

Here are fields that are used (range name to the right):
Active County Warren ActCounty
Value 2003 ActCountyValue
Code Cls1 ActCountyCode

Here is another piece that holds the ranges:

0 Cls1
5000 Cls2
7500 Cls3
10000 Cls4
15000 Cls5


Hope that makes sense -thanks!!!!!
 
Does the tutorial say that adding text is possible? ( can you tell us more about this tutorial? )

What type of shapes are you trying to manipulate?

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
Hi Glenn - thanks for the help!! The tutorial does not say you can add text.... I have come to the conclusion that what I need to do is just add text boxes that refer to my cells with the data.

Can you tell me what the code is to refer to a text box (my textbox is named 'SussexData') in excel? I have tried: SussexData.Text "test"

But I get a "Object Required" error

By the way, here it the link for the tutorial:


Thanks!!!
 
I got it- ....

ActiveSheet.Shapes("SussexData").Select
Selection.Text = Range("Data!C22").Value

Thanks!!!
 
Glad you go there in the end. Thanks for the link to the tutorial.

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top