LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default I Dunno

I'm getting an error on the line with the *****

HRESULT: 0x800A03EC. I've seen this error so many times in so many
instances but I can't seem to figure out why I'm getting it here. Perhaps my
indexes are are throwing it out of bounds? How do I test for this? I placed
an if statement prior to that line testing
((Excel.Range)oSheet.Cells[prodNumsRow, localColumnCount]) != null but I
think it's alway != null. This is becoming a fairly complex app and if you
need me to explain the whole thing then so be it. As you can see I'm testing
that nextItem is != null and getting rid of any extra spaces, not the problem.

Somebody help, I'm sick of this thing.

if (ds.Tables[0].Rows.Count 0)
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
object[] items = dr.ItemArray;

foreach (object o in items)
{
string nextItem = "";
nextItem = o.ToString().Trim();

if (nextItem != null)
{
***** ((Excel.Range)oSheet.Cells[prodNumsRow, localColumnCount]).Value2 =
nextItem;
}
errCount++; //ignore this
localColumnCount++;
}
}
}

Thank you
KB
--
Kevin C. Brown
Developer
 
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
Method? Function? Operator? I dunno ): Michael Smith Excel Programming 0 September 5th 03 09:47 PM


All times are GMT +1. The time now is 11:27 PM.

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

About Us

"It's about Microsoft Excel"