By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

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

P: 1
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("Excel.application")
Dim img As Excel.Application
Dim Pic As Excel.PictureFormat
ObjExl.Workbooks.Add
With ObjExl
.Cells(I, 1) = App.Path & "\Photographs\003.JPEG"
'.Picture = LoadPicture(App.Path & "\Photographs\003.JPEG")
'Set Pic = img.p
ActiveSheet.Value = 1
ActiveSheet.Image1.Picture = LoadPicture("E:\Softwares\GviCipla_Goa\Photographs \003.jpg")
.ActiveCell.Value = 5 '"E:\Softwares\GviCipla_Goa\Photographs\003.jpe g"
End With
ObjExl.Visible = True



End Sub
Sep 19 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.