+ Reply to Thread
Results 1 to 6 of 6

How do I resolve debug error macro Excel 2000? At least, any lead

  1. #1
    Excel 2000 Macros debugger
    Guest

    How do I resolve debug error macro Excel 2000? At least, any lead

    I am working on Excel 2000 macros and am frequently getting debug errors,
    although I notice no mistakes when creating the macros. Somebody please help
    !!

    Thanks,

    m.

  2. #2
    Anne Troy
    Guest

    Re: How do I resolve debug error macro Excel 2000? At least, any lead

    What are the errors?
    ************
    Anne Troy
    www.OfficeArticles.com

    "Excel 2000 Macros debugger" <Excel 2000 Macros
    [email protected]> wrote in message
    news:[email protected]...
    >I am working on Excel 2000 macros and am frequently getting debug errors,
    > although I notice no mistakes when creating the macros. Somebody please
    > help
    > !!
    >
    > Thanks,
    >
    > m.




  3. #3
    Norman Jones
    Guest

    Re: How do I resolve debug error macro Excel 2000? At least, any lead

    Hi Excel 2000 Macros debugger,

    You would need to post your code, the error encountered and the line
    highlighted when the error occurs.


    ---
    Regards,
    Norman



    "Excel 2000 Macros debugger" <Excel 2000 Macros
    [email protected]> wrote in message
    news:[email protected]...
    >I am working on Excel 2000 macros and am frequently getting debug errors,
    > although I notice no mistakes when creating the macros. Somebody please
    > help
    > !!
    >
    > Thanks,
    >
    > m.




  4. #4
    Excel 2000 Macros debugger
    Guest

    Re: How do I resolve debug error macro Excel 2000? At least, any

    I am trying to format US phone numbers for my database so that the telephone
    number column should have the local phone numbers following the country code
    and also a leading zero. "Selection.find ...." is highligted with yellow
    color in my VB Editor.

    The error that VB is throwing is

    Sub Tel()
    '
    ' Tel Macro
    ' Macro recorded 10/24/2005 by madhu
    '
    ' Keyboard Shortcut: Ctrl+t
    '
    Range("A1").Select
    Cells.Find(What:="tele", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Cells.Find(What:="telephone", After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False).Activate
    Columns("L:L").Select
    Selection.Find(What:="(", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.Replace What:="(", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    ActiveCell.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    With Selection
    .HorizontalAlignment = xlLeft
    .VerticalAlignment = xlBottom
    .Orientation = 0
    .AddIndent = False
    .IndentLevel = 0
    .ShrinkToFit = False
    .MergeCells = False
    End With
    ActiveWindow.SmallScroll Down:=-90
    Range("M10").Select
    Selection.EntireColumn.Insert
    Range("M11").Select
    ActiveCell.FormulaR1C1 = "=CONCATENATE(0, RC[-1])"
    Range("M11").Select
    Selection.AutoFill Destination:=Range("M11:M308"), Type:=xlFillDefault
    Range("M11:M308").Select
    Range("M298").Select
    ActiveWindow.SmallScroll Down:=-6
    Range("M297").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M263").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M229").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M195").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M161").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M127").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M93").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M59").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M11").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Range("L11").Select
    Range("L11").Select
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Range("M11").Select
    Application.CutCopyMode = False
    Columns("M:M").Select
    Selection.Delete Shift:=xlToLeft
    Range("L12").Select
    End Sub


    "Norman Jones" wrote:

    > Hi Excel 2000 Macros debugger,
    >
    > You would need to post your code, the error encountered and the line
    > highlighted when the error occurs.
    >
    >
    > ---
    > Regards,
    > Norman
    >
    >
    >
    > "Excel 2000 Macros debugger" <Excel 2000 Macros
    > [email protected]> wrote in message
    > news:[email protected]...
    > >I am working on Excel 2000 macros and am frequently getting debug errors,
    > > although I notice no mistakes when creating the macros. Somebody please
    > > help
    > > !!
    > >
    > > Thanks,
    > >
    > > m.

    >
    >
    >


  5. #5
    Excel 2000 Macros debugger
    Guest

    Re: How do I resolve debug error macro Excel 2000? At least, any

    Hi:

    I am trying to format US phone numbers for my database so that the telephone
    number column should have the local phone numbers following the country code
    and also a leading zero. "Selection.find ...." is highligted with yellow
    color in my VB Editor.

    The error that VB is throwing is

    Sub Tel()
    '
    ' Tel Macro
    ' Macro recorded 10/24/2005 by madhu
    '
    ' Keyboard Shortcut: Ctrl+t
    '
    Range("A1").Select
    Cells.Find(What:="tele", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Cells.Find(What:="telephone", After:=ActiveCell, LookIn:=xlFormulas, _
    LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    MatchCase:=False).Activate
    Columns("L:L").Select
    Selection.Find(What:="(", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.Replace What:="(", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    Selection.FindNext(After:=ActiveCell).Activate
    ActiveCell.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    Selection.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
    :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    MatchCase:= _
    False).Activate
    Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
    SearchOrder:=xlByRows, MatchCase:=False
    With Selection
    .HorizontalAlignment = xlLeft
    .VerticalAlignment = xlBottom
    .Orientation = 0
    .AddIndent = False
    .IndentLevel = 0
    .ShrinkToFit = False
    .MergeCells = False
    End With
    ActiveWindow.SmallScroll Down:=-90
    Range("M10").Select
    Selection.EntireColumn.Insert
    Range("M11").Select
    ActiveCell.FormulaR1C1 = "=CONCATENATE(0, RC[-1])"
    Range("M11").Select
    Selection.AutoFill Destination:=Range("M11:M308"), Type:=xlFillDefault
    Range("M11:M308").Select
    Range("M298").Select
    ActiveWindow.SmallScroll Down:=-6
    Range("M297").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M263").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M229").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M195").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M161").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M127").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M93").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M59").Select
    ActiveWindow.LargeScroll Down:=-1
    Range("M11").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Range("L11").Select
    Range("L11").Select
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Range("M11").Select
    Application.CutCopyMode = False
    Columns("M:M").Select
    Selection.Delete Shift:=xlToLeft
    Range("L12").Select
    End Sub



    "Anne Troy" wrote:

    > What are the errors?
    > ************
    > Anne Troy
    > www.OfficeArticles.com
    >
    > "Excel 2000 Macros debugger" <Excel 2000 Macros
    > [email protected]> wrote in message
    > news:[email protected]...
    > >I am working on Excel 2000 macros and am frequently getting debug errors,
    > > although I notice no mistakes when creating the macros. Somebody please
    > > help
    > > !!
    > >
    > > Thanks,
    > >
    > > m.

    >
    >
    >


  6. #6
    Norman Jones
    Guest

    Re: How do I resolve debug error macro Excel 2000? At least, any

    Hi Excel 2000,

    > Selection.find ...." is highligted with yellow color in my VB Editor.


    Your macro includes a number of such lines. If the search string, e.g. a
    left bracket character '(', is not found, you will encounter a run-time
    error.

    Perhaps easiest would be for you to respond with the following information:

    (1) Give examples of the initial data
    (2) Show the desired final format
    (3) Give the location of the data to be converted.


    ---
    Regards,
    Norman



    "Excel 2000 Macros debugger"
    <[email protected]> wrote in message
    news:[email protected]...
    >I am trying to format US phone numbers for my database so that the
    >telephone
    > number column should have the local phone numbers following the country
    > code
    > and also a leading zero. "Selection.find ...." is highligted with yellow
    > color in my VB Editor.
    >
    > The error that VB is throwing is
    >
    > Sub Tel()
    > '
    > ' Tel Macro
    > ' Macro recorded 10/24/2005 by madhu
    > '
    > ' Keyboard Shortcut: Ctrl+t
    > '
    > Range("A1").Select
    > Cells.Find(What:="tele", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > Cells.Find(What:="telephone", After:=ActiveCell, LookIn:=xlFormulas, _
    > LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
    > MatchCase:=False).Activate
    > Columns("L:L").Select
    > Selection.Find(What:="(", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > Selection.Replace What:="(", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > ActiveCell.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > Selection.Find(What:=")", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > Selection.Replace What:=")", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > Selection.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > Selection.FindNext(After:=ActiveCell).Activate
    > Selection.FindNext(After:=ActiveCell).Activate
    > Selection.FindNext(After:=ActiveCell).Activate
    > Selection.FindNext(After:=ActiveCell).Activate
    > Selection.FindNext(After:=ActiveCell).Activate
    > Selection.FindNext(After:=ActiveCell).Activate
    > ActiveCell.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > Selection.Find(What:=" ", After:=ActiveCell, LookIn:=xlFormulas, LookAt
    > _
    > :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
    > MatchCase:= _
    > False).Activate
    > Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
    > SearchOrder:=xlByRows, MatchCase:=False
    > With Selection
    > .HorizontalAlignment = xlLeft
    > .VerticalAlignment = xlBottom
    > .Orientation = 0
    > .AddIndent = False
    > .IndentLevel = 0
    > .ShrinkToFit = False
    > .MergeCells = False
    > End With
    > ActiveWindow.SmallScroll Down:=-90
    > Range("M10").Select
    > Selection.EntireColumn.Insert
    > Range("M11").Select
    > ActiveCell.FormulaR1C1 = "=CONCATENATE(0, RC[-1])"
    > Range("M11").Select
    > Selection.AutoFill Destination:=Range("M11:M308"), Type:=xlFillDefault
    > Range("M11:M308").Select
    > Range("M298").Select
    > ActiveWindow.SmallScroll Down:=-6
    > Range("M297").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M263").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M229").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M195").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M161").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M127").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M93").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M59").Select
    > ActiveWindow.LargeScroll Down:=-1
    > Range("M11").Select
    > Range(Selection, Selection.End(xlDown)).Select
    > Selection.Copy
    > Range("L11").Select
    > Range("L11").Select
    > Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
    > _
    > False, Transpose:=False
    > Range("M11").Select
    > Application.CutCopyMode = False
    > Columns("M:M").Select
    > Selection.Delete Shift:=xlToLeft
    > Range("L12").Select
    > End Sub
    >
    >
    > "Norman Jones" wrote:
    >
    >> Hi Excel 2000 Macros debugger,
    >>
    >> You would need to post your code, the error encountered and the line
    >> highlighted when the error occurs.
    >>
    >>
    >> ---
    >> Regards,
    >> Norman
    >>
    >>
    >>
    >> "Excel 2000 Macros debugger" <Excel 2000 Macros
    >> [email protected]> wrote in message
    >> news:[email protected]...
    >> >I am working on Excel 2000 macros and am frequently getting debug
    >> >errors,
    >> > although I notice no mistakes when creating the macros. Somebody
    >> > please
    >> > help
    >> > !!
    >> >
    >> > Thanks,
    >> >
    >> > m.

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1