I have a macro I am using to create sheets based off of a template. I'm wondering how to use that macro to also insert a static map url into a shape based off of what sheet was created. This is the code for the create sheets
Sub CreateSheets()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("Stop Data")
LR = .Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To LR
Sheets("Template").Copy Before:=Sheets("Template")
ActiveSheet.Name = .Range("B" & i).Value
Next i
End With
Application.ScreenUpdating = True
End Sub
I found out how to load the image into the shape with this.
Sub MapInsert()
With ActiveSheet.Shapes("Map").Fill
.Visible = msoTrue
.UserPicture "https://maps.googleapis.com/maps/ap...7&zoom=17&size=775x775&maptype=satellite&key="
.TextureTile = msoFalse
End With
The sheet that is created is named what is in Column B and everything from the template is carried over.
Sub CreateSheets()
Dim LR As Long, i As Long
Application.ScreenUpdating = False
With Sheets("Stop Data")
LR = .Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To LR
Sheets("Template").Copy Before:=Sheets("Template")
ActiveSheet.Name = .Range("B" & i).Value
Next i
End With
Application.ScreenUpdating = True
End Sub
I found out how to load the image into the shape with this.
Sub MapInsert()
With ActiveSheet.Shapes("Map").Fill
.Visible = msoTrue
.UserPicture "https://maps.googleapis.com/maps/ap...7&zoom=17&size=775x775&maptype=satellite&key="
.TextureTile = msoFalse
End With
The sheet that is created is named what is in Column B and everything from the template is carried over.