Geolocation with coordinates in Excel III: including maps

17 Sep 2013

Compartelo:Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

I am one of those who think that every day you can learn something new. This post is the result of a conversation with Francis (a reader) in one of the previous entries. Thanks to his intervention I got interested in how to take a step further in the presentation and usability of our Excel spreadsheet and include a map on the sheet itself.

If you have followed the previous post , should already have a sheet with their respective geographic locations and coordinates, but we may want to have a map to locate, for each of the coordinates, the concrete geographic point.

Or, why not? Imagine we want to write a record of a country, community … and we want to include the above information along with a map of its location. Well, this is also possible. To do so, follow the next steps:
Select the tab “Programmer”, if not enabled (see my previous post Geolocation I)

Pulsamos sobre el botón “Insertar” y del menú desplegable que se nos muestra, en la fila de los controles ActiveX, seleccionamos “Más controles“.

Click on the button “Insert” drop down menu that shows, in the row of ActiveX controls, select “More Controls“.

Search on the list “Microsoft Web Browser“, and select and accept that control.

Now your cursor will have changed shape, is displayed as a cross to indicate that since that time we will select the area you want to accommodate the ActiveX control.

Select the area that we deem appropriate for our map.

Then add a button. How? Pretty simple.

Repeat the samesteps than the previous control, but this time, use the command button (Active X control).

So,  tab “Programmer“, “Insert” button, select “Command Button” and click the area where it will be placed.

Any change in position, size and so, you want to make with any of the drivers must be done in the “Design” mode (square icon).

You can change some of the buttons properties on the tab “Properties“. To get to this tab, we stand on the button and right click on “View Properties“.

If you want just pressing each of the buttons to see the map associated with the province (or selected geographic point), just need to add a little bit of code:

Select from the popup menu, “View Source” on each of the buttons.

And add the code that handles the viewer (map) and the calls from each button.

NOTE: I have chosen to put the code as image, because I think it looks cleaner, and I also avoid strange characters errors thatWordpress seems to include when publishing.

The result, making the right adjustments to accommodate the whole set would be something like this:

We have added a video where we show other options of the WebBrowser command button usage, very interesting!!

PS: In the thread of questions / answers that we had in the post Geolocation II, also talked about how to print this control.

I’ll try to treat it in a subsequent post.

Any feedback, code improvement…will be appreciated 🙂

Post relacionados

Compartelo:Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

Sin comentarios

Dejar un comentario

*