rickincanada
Board Regular
- Joined
- Aug 31, 2010
- Messages
- 61
Hi there, I'm pretty new at the VB side of excel and am having some problems sorting through this issue. I've researched the web and cannot find the answer I need. Here's what I'm trying to do:
I have a cell on a sheet in which I insert an image on using the following macro:
Sub getImage()
Dim myPic As Object
Application.ScreenUpdating = 0
Set myPic = Sheets(1).Pictures.Insert( _
"http://testurl.com/private_folder/clients/dealer1/header.jpg")
With myPic
.Top = [a1].Top
.Left = [a1].Left
.ShapeRange.Height = [a1].RowHeight * 1
End With
Application.ScreenUpdating = -1
Set myPic = Nothing
End Sub
This works good however now I want to add a parameter to the middle of this url using a value from a cell. So that if cell "A2" = "Smiths" my url comes out looking like this:
"http://testurl.com/private_folder/clients/Smiths/header.jpg"
Thanks in advance for helping me with this!
Rick
I have a cell on a sheet in which I insert an image on using the following macro:
Sub getImage()
Dim myPic As Object
Application.ScreenUpdating = 0
Set myPic = Sheets(1).Pictures.Insert( _
"http://testurl.com/private_folder/clients/dealer1/header.jpg")
With myPic
.Top = [a1].Top
.Left = [a1].Left
.ShapeRange.Height = [a1].RowHeight * 1
End With
Application.ScreenUpdating = -1
Set myPic = Nothing
End Sub
This works good however now I want to add a parameter to the middle of this url using a value from a cell. So that if cell "A2" = "Smiths" my url comes out looking like this:
"http://testurl.com/private_folder/clients/Smiths/header.jpg"
Thanks in advance for helping me with this!
Rick