Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default "Member Not Found" Error with Excel 2000

Hello,

I have been trying to write a program that works with Excel and have
been rather successful. However, I was writing the program under WinXP
and OfficeXP.. the program is meant to run under Win2000 and
Office2000.

My program runs fine on my computer (XP) but gives the "Member Not
Found" error on the Win2K computer.

Let me show you my code:
//the pointof the following function is to open an Excel file
//and make it visible to the user.
void CSresult::OnButtonExcel()
{
boxindex = m_result_box.GetCurSel ();
CString filestring =
myvector[indexoffound[boxindex]].filepath; filestring.Replace('*', '
');
if (boxindex!=-1 && resultvector[0]!=CString("No Matches Found") &&
filestring!=CString("UNKNOWN")) //not wrapped in actual program
{
COleVariant VOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
_Application objApp;
_Workbook objBook;
Workbooks objBooks;

objApp.CreateDispatch("Excel.Application");
objBooks = objApp.GetWorkbooks();
objApp.SetVisible(TRUE);
/*OK, the following call is what causes the error(of course, it's not
wrapped in the actual program)*/
objBooks.Open(filestring,
VOptional, VOptional, VOptional, VOptional,
VOptional, VOptional, VOptional, VOptional,
VOptional, VOptional, VOptional,
VOptional,VOptional,VOptional);

/* objApp.FindFile();
objApp.GetActiveWorkbook();
The above two lines would work but the user would have to select the
file -- not the wanted outcome
*/

AfxMessageBox ("Click OK When You Are Done With Excel File");
objBook.Close(COleVariant((short)FALSE), VOptional, VOptional);
objApp.Quit();
}
else
AfxMessageBox ("One of the following happened:\n1. There is no Excel
file associated with this entry.\n2. You have not made a
selection.\n3. Your search yielded no results.");

}

Any idea what could cause this error?

I thank you in advance,
Sincerely,

Paul.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default "Member Not Found" Error with Excel 2000

Hello Paul,

Maybe the XP library is different from the 2000 library.
Try to re-link the missing library or change the function
in XP library but not in 2000 library.

Best Regards

Bill
-----Original Message-----
Hello,

I have been trying to write a program that works with

Excel and have
been rather successful. However, I was writing the

program under WinXP
and OfficeXP.. the program is meant to run under Win2000

and
Office2000.

My program runs fine on my computer (XP) but gives

the "Member Not
Found" error on the Win2K computer.

Let me show you my code:
//the pointof the following function is to open an Excel

file
//and make it visible to the user.
void CSresult::OnButtonExcel()
{
boxindex = m_result_box.GetCurSel ();
CString filestring =
myvector[indexoffound[boxindex]].filepath;

filestring.Replace('*', '
');
if (boxindex!=-1 && resultvector[0]!=CString("No

Matches Found") &&
filestring!=CString("UNKNOWN")) //not wrapped in

actual program
{
COleVariant VOptional((long)

DISP_E_PARAMNOTFOUND, VT_ERROR);
_Application objApp;
_Workbook objBook;
Workbooks objBooks;

objApp.CreateDispatch("Excel.Application");
objBooks = objApp.GetWorkbooks();
objApp.SetVisible(TRUE);
/*OK, the following call is what causes the error(of

course, it's not
wrapped in the actual program)*/
objBooks.Open(filestring,
VOptional, VOptional,

VOptional, VOptional,
VOptional, VOptional,

VOptional, VOptional,
VOptional, VOptional,

VOptional,
VOptional,VOptional,VOptional);

/* objApp.FindFile();
objApp.GetActiveWorkbook();
The above two lines would work but the user would have to

select the
file -- not the wanted outcome
*/

AfxMessageBox ("Click OK When You Are Done

With Excel File");
objBook.Close(COleVariant((short)FALSE),

VOptional, VOptional);
objApp.Quit();
}
else
AfxMessageBox ("One of the following

happened:\n1. There is no Excel
file associated with this entry.\n2. You have not made a
selection.\n3. Your search yielded no results.");

}

Any idea what could cause this error?

I thank you in advance,
Sincerely,

Paul.

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default "Member Not Found" Error with Excel 2000

Bill,

I understand that this indeed is the issue at hand... however, I don't
have the Win2K library available and I don't know how to change the
function -- the Workbooks::Open (...) function calls another function
called InvokeHelper (...) and that's when the error occurs. I can't
find the definition for this function. I don't know what to do!!!

Thank you,

Paul.

"Bill Li" wrote in message ...
Hello Paul,

Maybe the XP library is different from the 2000 library.
Try to re-link the missing library or change the function
in XP library but not in 2000 library.

Best Regards

Bill
-----Original Message-----
Hello,

I have been trying to write a program that works with

Excel and have
been rather successful. However, I was writing the

program under WinXP
and OfficeXP.. the program is meant to run under Win2000

and
Office2000.

My program runs fine on my computer (XP) but gives

the "Member Not
Found" error on the Win2K computer.

Let me show you my code:
//the pointof the following function is to open an Excel

file
//and make it visible to the user.
void CSresult::OnButtonExcel()
{
boxindex = m_result_box.GetCurSel ();
CString filestring =
myvector[indexoffound[boxindex]].filepath;

filestring.Replace('*', '
');
if (boxindex!=-1 && resultvector[0]!=CString("No

Matches Found") &&
filestring!=CString("UNKNOWN")) //not wrapped in

actual program
{
COleVariant VOptional((long)

DISP_E_PARAMNOTFOUND, VT_ERROR);
_Application objApp;
_Workbook objBook;
Workbooks objBooks;

objApp.CreateDispatch("Excel.Application");
objBooks = objApp.GetWorkbooks();
objApp.SetVisible(TRUE);
/*OK, the following call is what causes the error(of

course, it's not
wrapped in the actual program)*/
objBooks.Open(filestring,
VOptional, VOptional,

VOptional, VOptional,
VOptional, VOptional,

VOptional, VOptional,
VOptional, VOptional,

VOptional,
VOptional,VOptional,VOptional);

/* objApp.FindFile();
objApp.GetActiveWorkbook();
The above two lines would work but the user would have to

select the
file -- not the wanted outcome
*/

AfxMessageBox ("Click OK When You Are Done

With Excel File");
objBook.Close(COleVariant((short)FALSE),

VOptional, VOptional);
objApp.Quit();
}
else
AfxMessageBox ("One of the following

happened:\n1. There is no Excel
file associated with this entry.\n2. You have not made a
selection.\n3. Your search yielded no results.");

}

Any idea what could cause this error?

I thank you in advance,
Sincerely,

Paul.

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
error "Excel has found unreadable Content" JLMHoss Excel Discussion (Misc queries) 10 August 20th 08 03:54 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Compile error: Method or data member not found Brian Day Excel Worksheet Functions 0 July 22nd 07 03:20 AM
Why do I receive "Fill not found" message when I open Excel? dmmahone Setting up and Configuration of Excel 0 March 28th 07 12:03 AM
using % button gives error "percent style not found" Can I reset? Light Excel Discussion (Misc queries) 3 March 16th 06 12:18 PM


All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"