LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Norman Jones
 
Posts: n/a
Default 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.






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I lock info in Excel 2003 and users in Excel 2000 enter info? Mimmsan Excel Discussion (Misc queries) 1 September 8th 05 12:12 AM
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file DCheslock Excel Discussion (Misc queries) 1 May 5th 05 10:46 PM
Excel XP 2002 Vs. Excel 2000 Samantha Excel Discussion (Misc queries) 0 April 18th 05 03:54 PM
i want to connect excel with sql server 2000 as database with macr khurram saddique Excel Discussion (Misc queries) 2 February 18th 05 11:09 AM
Excel 2000 to Excel 2002 problem Dave the slaphead Excel Discussion (Misc queries) 3 February 17th 05 06:17 PM


All times are GMT +1. The time now is 02:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"