Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2004

Tip: Looking for answers? Try searching our database.

Find/replace Difference in 2000 and XP/2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
scorpion53061 - 30 Jan 2004 19:41 GMT
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)
Jean-Guy Marcil - 30 Jan 2004 20:47 GMT
Have you tried posting in an Excel group?

--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcil@sympatico.ca
Word MVP site: http://www.word.mvps.org

> What am I doing wrong?
>
[quoted text clipped - 60 lines]
>    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
scorpion53061 - 30 Jan 2004 21:12 GMT
> 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....
Jean-Guy Marcil - 30 Jan 2004 21:28 GMT
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

--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcil@sympatico.ca
Word MVP site: http://www.word.mvps.org

> > Have you tried posting in an Excel group?
>
[quoted text clipped - 4 lines]
>
> Sorry if I offended....
Peter Hewett - 30 Jan 2004 21:47 GMT
Hi

This is a Word News Group try an Excel NG.

Cheers - Peter

> What am I doing wrong?
>
[quoted text clipped - 60 lines]
>    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.