Find/replace Difference in 2000 and XP/2003

Find/replace Difference in 2000 and XP/2003

Post by scorpion53 » Sun, 01 Feb 2004 04:41:20


What am I doing wrong?

in this code it searches the excel spreadsheet for text, replaces it. XP
and 2003 it works beautifully.

In Excel 2000 it bombs saying a automation error (see below code for error
message) it is a problem.

Those in my vb.net group are not responding. You guys are my last
hope......Thank you for any help you can give.

Can anyone suggest a workaround? And why would it work in 2003 and XP and
not in 2000?

I also tried late binding but to no avail. Same error.

WSheet.Application.Selection.Replace(What:="NONE", Replacement:="",
LookAt:=1, _
SearchOrder:=1, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False)

WSheet.Application.Selection.Replace(What:="PRODUCTGROUP",
Replacement:="GROUP", LookAt:=1, _
SearchOrder:=1, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False)


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x800A03EC): Exception from
HRESULT: 0x800A03EC.
at System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32
culture, String[] namedParameters)
at System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
Binder binder, Object target, Object[] args, ParameterModifier[] modifiers,
CultureInfo culture, String[] namedParameters)
at Microsoft.VisualBasic.CompilerServices.VBBinder.InvokeMember(String
name, BindingFlags invokeAttr, Type objType, IReflect objIReflect, Object
target, Object[] args, ParameterModifier[] modifiers, CultureInfo culture,
String[] namedParameters)
at
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack)
at Unlock_Orders.Form3.GetAllItemsSpecifiedLists()
at Unlock_Orders.Form3.Button4_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
 
 
 

Find/replace Difference in 2000 and XP/2003

Post by Jean-Guy M » Sun, 01 Feb 2004 05:47:21

Have you tried posting in an Excel group?


"scorpion53061" <Its the end of the world as we know XXXX@XXXXX.COM > a rit

invokeAttr,
modifiers,
Boolean[]
o,

 
 
 

Find/replace Difference in 2000 and XP/2003

Post by scorpion53 » Sun, 01 Feb 2004 06:12:22

> Have you tried posting in an Excel group?

The office automation group hasnt had any idea.

I was not aware of any Excel based group that would help me. Do you have a
suggestion?

Sorry if I offended....
 
 
 

Find/replace Difference in 2000 and XP/2003

Post by Jean-Guy M » Sun, 01 Feb 2004 06:28:08

Hi there,

No offense taken, I was just trying to steer you to a place where Excel
experts might be able to answer your question faster. While most of us have
had experience with Excel vba, it is not necessarily everyone's strong
suit...

Try
microsoft.public.excel.programming
or
microsoft.public.excel.interopoledde

HTH


"scorpion53061" <Its the end of the world as we know XXXX@XXXXX.COM > a rit
 
 
 

Find/replace Difference in 2000 and XP/2003

Post by Peter Hewe » Sun, 01 Feb 2004 06:47:12

i

This is a Word News Group try an Excel NG.

Cheers - Peter

"scorpion53061" <Its the end of the world as we know XXXX@XXXXX.COM > wrote in
news: XXXX@XXXXX.COM :

error
invokeAttr,
modifiers,
culture,
(Object
[]
o,