RE: SheetChange event crashes using Range.set_value (C#)
- From: v-phuang@xxxxxxxxxxxxxxxxxxxx ("Peter Huang" [MSFT])
- Date: Mon, 06 Mar 2006 02:53:23 GMT
Hi
Do you mean call the TAG function in the SheetChange event?
Based on my test, I can not reproduce the problem.
Here is my test code.
public String TAG(Excel.Range range)
{
String result = "";
try
{
result = "banana apple";
//comment the following line out to make it work
result += range.Value2.ToString();
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show("Bugger2!\n"
+ ex.ToString(), "Localization Function");
result = "ERROR!";
}
return result;
}
bool bChanged = false;
void exApp_SheetChange(object Sh,
Microsoft.Office.Interop.Excel.Range Target)
{
if( bChanged )
return;
try
{
bChanged = true;
TAG(Target);
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.ToString());
}
finally
{
bChanged = false;
}
}
You may have a try.
If you still have any concern, can you build a simple reproduce sample and
send the whole solution to me via removing "online" from my email address.
So that I can reproduce the problem at my side.
Thanks for your efforts.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- RE: SheetChange event crashes using Range.set_value (C#)
- From: Steve Kirk (Insomniac Games)
- RE: SheetChange event crashes using Range.set_value (C#)
- References:
- SheetChange event crashes using Range.set_value (C#)
- From: Steve Kirk (Insomniac Games)
- RE: SheetChange event crashes using Range.set_value (C#)
- From: "Peter Huang" [MSFT]
- RE: SheetChange event crashes using Range.set_value (C#)
- From: "Peter Huang" [MSFT]
- SheetChange event crashes using Range.set_value (C#)
- Prev by Date: Re: Error with calander
- Next by Date: Re: Filling Array with uniqur random numbers
- Previous by thread: RE: SheetChange event crashes using Range.set_value (C#)
- Next by thread: RE: SheetChange event crashes using Range.set_value (C#)
- Index(es):