10-21-2010, 01:07 PM
This should give the error at the Range("B9").select statement only.
this will work in VBA macro but you can not use this way in automation. also the the next statment, where does the objWorkSheet1 declared.
replace your code with the below and try
this will work in VBA macro but you can not use this way in automation. also the the next statment, where does the objWorkSheet1 declared.
replace your code with the below and try
Code:
objWorkbook1.ActiveSheet.range("B9").Select
objWorkbook1.ActiveSheet.Pictures.Insert("C:\Documents and Settings\msafiullah\Desktop\error.bmp")