ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I resolve debug error macro Excel 2000? At least, any lead (https://www.excelbanter.com/excel-discussion-misc-queries/51904-how-do-i-resolve-debug-error-macro-excel-2000-least-any-lead.html)

Excel 2000 Macros debugger

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.

Anne Troy

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
wrote in message
...
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.




Norman Jones

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
wrote in message
...
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.




Excel 2000 Macros debugger

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
wrote in message
...
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.





Excel 2000 Macros debugger

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
wrote in message
...
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.





Norman Jones

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"
wrote in message
...
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
wrote in message
...
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.








All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com