Thank you everyone for the suggestions!! I got it to work finally, and I feel silly because it is sooo simple:
ShellExecute(NULL, "open" ,"Waypoint Tool.xls", "C:\\Documents and Settings\\Lab1\\My Documents\\", NULL, SW_SHOWNORMAL);
Absolutely nothing. I tried even that third line you gave with "open" instead of "NULL" in the second parameter and it still didn't work. Also, I tried as before with "excel" in the third parameter, "Tool.xls" in the fourth, and the rest as you gave me-- it opens excel but says that it cannot...
Thank you everyone for the suggestions -- I can't tell you how much I appreciate having something to try. I am running out of ideas. So far nothing has worked. So I am looking into other options. Happy Thanksgiving!
I found a thread which says that basically the problem lies with the spaces that are in the path name. I tried what the thread suggests, which is to add another set of quotes, but it didn't work.http://www.tech-archive.net/Archive/Access/microsoft.public.access.formscoding/2007-05/msg01211.html
Thanks, 2ffat. I tried both lines you gave. It doesn't do anything at all. Before, with the original line, it would at least open Excel. But if I take out "Excel.exe" it doesn't do anything.
It just occured to me that I put in NULL for the handle. The link you gave me from the FAQs says that it should be the handle for the parent window -- what does that mean?
This is odd though -- when I put in the file name "Calculate Distance.xls", which is another file in excel that I have, it says that it cannot find "Calculate.xls". Then another box opens that says it cannot find "Distance.xls". Basically, it is reading them as two different files.
Thank you for those links. I had not read those, but I read about ShellExecute() on MSDN after posting this, and it was basically the same thing.
I am doing just what one of the examples said, but it still says it cannot find the file.
I am using Borland Builder C++ 2009. I want to open a particular file from Microsoft Excel during runtime. The following line of code opens Excel, but there's a message saying it cant find the file "Tool.xls" -- I have tried giving it the entire path for the file, and it still can't find it...
Okay, I found there was another problem, not with the AnsiString() conversion function. Sorry, everyone. I think I need to wait a little longer before I post.
I am using CodeGear C++ Builder 2009. I am getting an error, and I don't understand why. Here's my code:
if (angle < 0) {
angle = 360 - angle;
}
AnsiString zero;
AnsiString str = AnsiString(angle);
int dot = AnsiPos(".",str);
AnsiString rounder = str.SubString(dot + 2, 1)...
I am using a dll which allows me to create files containing both images and data about the images. I don't get an error when I run my program. However, when I go to view the files in a special viewer, it won't show a particular section. So, something is wrong with the way that I am entering the...
I found a great site for this. Using the source code provided, I can read the information in the exif. Now, I need to figure out how to edit.
http://www.codeproject.com/KB/graphics/cexif.aspx http://www.codeproject.com/KB/graphics/cexif.aspx
I am not sure if this is the best place to ask this. I am using Borland Builder 2007. I want to edit the exif (header file) for jpgs from a digital camera. It would be nice to access the information (such as the camera type) and then delete it so that it is just a normal jpg. Just wondering if...
I am using CodeGear RAD Studio Borland Builder C++. I have a dll file that I have linked implicitly. I want to be able to use the classes and functions inside this library, but everytime I try, I get a first chance exception at run time stating, "Exception class EAccessViolation with message...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.