hello guys,
This is my problem for example.
My program is on my computer the image location of my picture is on my computer
then i want to debug my program into other computer but the picture is not appear because the location path is changed
this is my code i see this code into internet..

 xlWorkSheet.Shapes.AddPicture("C:User\Macro\RideHistory\RideHistory\bin\Debug\westech2.jpg", _
        Microsoft.Office.Core.MsoTriState.msoFalse, _
        Microsoft.Office.Core.MsoTriState.msoCTrue, 90, 1, 210, 45)

this code is for import picture to Ms Excel
anyone can help me? thanks..

Since debug is default application folder, you shouldn't need the full path, just the file name.

     xlWorkSheet.Shapes.AddPicture("westech2.jpg", _
Microsoft.Office.Core.MsoTriState.msoFalse, _
Microsoft.Office.Core.MsoTriState.msoCTrue, 90, 1, 210, 45)

Did you make sure the file is in the debug folder of the other machine?

Edited 3 Years Ago by tinstaafl

And is the solution configuration set to debug on the other machine? I probably shouldn't need to ask, but is the file named the same?

Edited 3 Years Ago by tinstaafl

YES sir the file name is the same.
I have a solution for this but i dont think so if this type of solution is okay..
I copy the picture into.. C:\User because I think all of windows computers have that.

Here's one other thing to try. Add the file to the project as an existing item. Then verify it works with just the file name. Then zip the whole project folder, without the bin folder into an archive and extract it into the projects folder on the other computer. You should be able to open the project there and run it.

sir same error I think the problem is my code thats why it cant be run. I will search more codes for this.
And sir do you know how to descending order by date? The database is Sql server 2005. This is my code

    Seleect * Table1 ORDER BY Date DESC

the order of date is not descending order.

Ideally you should start a new thread for that. But as long as you spell Select right the statement you're using should work.

Thank you so much sir. Im done for that problem hehe I convert the field name thanks again.

This article has been dead for over six months. Start a new discussion instead.