<\/a>How to Name a Shape in Excel<\/p><\/div>\n
Step 2. Generate URL for Google Static Map API<\/h1>\n Form your URL based on different parameters you would like. For example to generate the Map of Amsterdam City in 400X400 size with Zoom Level: 14, following would be the URL.<\/p>\n
[one_full spacing=”yes” last=”no” center_content=”no” hide_on_mobile=”no” background_color=”#FEF6D2″ background_image=”” background_repeat=”no-repeat” background_position=”left top” link=”” hover_type=”none” border_position=”all” border_size=”1.5px” border_color=”#EDDB93″ border_style=”solid” padding=”10px” margin_top=”” margin_bottom=”” animation_type=”0″ animation_direction=”down” animation_speed=”0.1″ animation_offset=”” class=”” id=””]https:\/\/maps.googleapis.com\/maps\/api\/staticmap?center=Amsterdam&zoom=14&size=400\u00d7400[\/one_full]<\/p>\n
Note: To check whether your URL is correct or not, you can simply open this URL as it is in any browser. If you see a static map images generated, that means your URL is correct and you can go ahead and use it in your Excel VBA code.<\/p>\n
Step 3. VBA Code to display Google Static Map<\/h1>\n VBA code to execute to display the City map of Amsterdam in the rectangle shape<\/p>\n
\r\nSub insertMap()\r\n ' prepare your google static map API\r\n gAPIMapUrl = "https:\/\/maps.googleapis.com\/maps\/api\/staticmap?center=Amsterdam&zoom=12&size=640x640"\r\n Shapes("your Shape Name").Fill.UserPicture gAPIMapUrl\r\nEnd Sub\r\n<\/code><\/pre>\nNow you know how to include a map in your excel sheet using excel vba and Google Static Map API?<\/p>\n
Based on the above explanation, I have created a sample workbook, which you can download and play around with it.<\/p><\/blockquote>\n
Download Sample MAP Generator Excel<\/h1>\n Download this, use it and do not forget to provide me your feedback by typing your comment here or sending en email or you can tweet me <\/a> You can also share it with your friends, colleagues or whomsoever you want to!!<\/p>\n\n<\/span>","protected":false},"excerpt":{"rendered":"Dear Readers, In this article, I am going to give you a quick tip – how can you add google map in your excel workbook without opening the google map in any browser. More details about this will follow… To do that I am using Google Static Map API. I am not going explain you […]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1246,1675],"tags":[],"class_list":["post-4845","post","type-post","status-publish","format-standard","hentry","category-macro","category-excel-macro-for-beginners"],"yoast_head":"\n
Macro to Add Google Map of your City dynamically - In Excel<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n