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.
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.
What are the errors?
************
Anne Troy
www.OfficeArticles.com
"Excel 2000 Macros debugger" <Excel 2000 Macros
debugger@discussions.microsoft.com> wrote in message
news:AA3BFDF8-6EDA-4D26-917D-43CA4A850B70@microsoft.com...
>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.
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
debugger@discussions.microsoft.com> wrote in message
news:AA3BFDF8-6EDA-4D26-917D-43CA4A850B70@microsoft.com...
>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.
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
> debugger@discussions.microsoft.com> wrote in message
> news:AA3BFDF8-6EDA-4D26-917D-43CA4A850B70@microsoft.com...
> >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.
>
>
>
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
> debugger@discussions.microsoft.com> wrote in message
> news:AA3BFDF8-6EDA-4D26-917D-43CA4A850B70@microsoft.com...
> >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.
>
>
>
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"
<Excel2000Macrosdebugger@discussions.microsoft.com> wrote in message
news:916006BB-2EAB-4A5B-B89D-4718C52E7702@microsoft.com...
>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
>> debugger@discussions.microsoft.com> wrote in message
>> news:AA3BFDF8-6EDA-4D26-917D-43CA4A850B70@microsoft.com...
>> >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.
>>
>>
>>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks