please guide me how to insert a picture to a particular cell in excel sheet?
I used the following code, but it inserts the picture in the excel file not in the cell I specified.
Dim xApp As Object
Dim xWb As Object
Dim xWs As Object
Dim img as string
Set xApp = CreateObject("Excel.Application")
xApp.Workbooks.Open (filename)
xApp.Visible = True
img = .filename
Picture1.Picture = LoadPicture(img)
xApp.Workbooks.Add
Set xWb = xApp.Workbooks(1)
Set xWs = xWb.Worksheets(1)
xWs.range("B5").Select
xApp.activesheet.Pictures.Insert(img).Select