Error in loading image in excel at a runtime from vb 6

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NPS2000
    New Member
    • Sep 2007
    • 1

    Error in loading image in excel at a runtime from vb 6

    i have problem when i have pass image path
    i have mention code bellow pls help me


    Private Sub ExcelReport()
    Dim ObjExl As Object
    Set ObjExl = Nothing
    Set ObjExl = CreateObject("E xcel.applicatio n")
    Dim img As Excel.Applicati on
    Dim Pic As Excel.PictureFo rmat
    ObjExl.Workbook s.Add
    With ObjExl
    .Cells(I, 1) = App.Path & "\Photographs\0 03.JPEG"
    '.Picture = LoadPicture(App .Path & "\Photographs\0 03.JPEG")
    'Set Pic = img.p
    ActiveSheet.Val ue = 1
    ActiveSheet.Ima ge1.Picture = LoadPicture("E: \Softwares\GviC ipla_Goa\Photog raphs\003.jpg")
    .ActiveCell.Val ue = 5 '"E:\Softwares\ GviCipla_Goa\Ph otographs\003.j peg"
    End With
    ObjExl.Visible = True



    End Sub
Working...