Hey, thanks for the response. I just figured out that I can use Google API as an image to insert into the workbook.
No need for geocoding, no need for browser controls.
Awesome!
http://code.google.com/apis/maps/doc...ex.html#Sensor
My code for anyone else that may be interested:
Sub InsertGoogleMapsPictures()
'THIS INSERTS GOOGLE MAPS IMAGES BASED ON PROPERTY ADDRESS
On Error Resume Next
Application.StatusBar = "INSERTING GOOGLE MAPS"
Dim fCell As Range, lCell As Range, rng As Range
Dim i As Integer, x As Integer
Dim wsName As String
Dim wsSummary As Worksheet, wsDest As Worksheet
Dim picLoc As String
Set wsSummary = Sheets("Portfolio Summary")
With wsSummary
Set fCell = .Cells(4, 1)
Set lCell = .Cells(65536, 1).End(xlUp)
Set rng = Range(fCell, lCell)
For i = 1 To rng.Count
wsName = i & " - " & .Cells(i + 3, 18).Text & " - " & .Cells(i + 3, 1).Text
Set wsDest = Sheets(wsName)
With wsDest
picLoc = "http://maps.googleapis.com/maps/api/staticmap?size=400x330&maptype=roadmap\&markers=size:mid%7Ccolor:red%7C232+" & .Cells(6, 1).Text & "&zoom=15&sensor=false"
.Activate
.Pictures.Insert (picLoc)
With ActiveSheet.Pictures(ActiveSheet.Pictures.Count)
.ShapeRange.LockAspectRatio = False
.Top = wsDest.Cells(46, 3).Top
.Left = wsDest.Cells(46, 3).Left
.Height = wsDest.Cells(71, 3).Top - wsDest.Cells(46, 3).Top
.Width = wsDest.Cells(46, 10).Left - wsDest.Cells(46, 3).Left
.Placement = xlMoveAndSize
.PrintObject = True
End With
End With
Next i
.Activate
.Cells(1, 1).Select
End With
End Sub
Bookmarks