![google maps api vba google maps api vba](http://1.bp.blogspot.com/-gBqJRUUYNkY/UQ1QVBS8jOI/AAAAAAAAANQ/pIvBmRAb_-U/w1200-h630-p-k-no-nu/ClaveApi.png)
GUrl = "" & strAddress & ",0&markers=|" & strAddress & "|&zoom=17&size=640圆40&key=YOUR GOOGLE KEY GOES HERE" ' Set up the google static map API URL () StrAddress = Replace(strAddress, " ", "+") StrAddress = Replace(strAddress, ",", "") Removing the Fill color isn’t necessary as the Google map will cover any fill color, but it is good housekeeping in case there is an error and No image is returned. From the Ribbon Insert menu, select Shapes and then the Rectangle (see the following image.) Right click on the inserted rectangle to select Format Shape from the bottom of the context menu. The second step is to insert a rectangle with No Fill on the worksheet. Do not get overwhelmed by the different products and pricing simply get one. This key must be sent at the end of the URL which you will use to get the static map image. The first thing to do is to get your own Google Platform key. It is created dynamically from the Job Address of the estimate each time the Dashboard in opened. At the lower right you will see the static Google map.
![google maps api vba google maps api vba](https://iliauk.files.wordpress.com/2015/12/googmaps_vba2.png)
The following image is of an Excel Dashboard which was developed for a building estimator workbook.
GOOGLE MAPS API VBA REGISTRATION
Most likely it will also come at an expense…Google will ask you for a credit card number during the registration process. Adding these other features to your project will require some more effort and possibly the Webbrowser ActiveX control, which may or may not work. This is simply a tutorial on placing a static map (without zoom, street view or travel direction capabilities) on an Excel worksheet. The entire Google Maps Platform is complex and will not be explained here. You DO NOT need to find and add some obscure web browser control which may or may not work on your version of Excel (I am using Office 365 and this code was written on Excel 16, 64 bit.) Adding a static Google map to a worksheet requires only a few lines of code, an empty rectangular “shape” placed on the sheet and an account with Google to access their Maps API.