#1   Report Post  
Junior Member
 
Posts: 1
Default Error 2023

Ok new user here so be gentle :)

Long story short, Im working with a excel database for a karate studio that was designed by someone who is no longer with us. I am trying to run an action that creates and prints labels and when i do I get a run time error. The following is what shows up when i debug. If more info is needed let me know, this database contains some sensitive info so I'm trying to be careful of what I post.

x.Selection.TypeParagraph

' Change font back so it is not red for rest of label
x.Selection.Font.ColorIndex = wdBlack
x.Selection.Font.Name = "Courier New"

'*
'* Format Phone Info
'*
x.Selection.Font.Bold = wdToggle
x.Selection.TypeText Text:="Phones: "
x.Selection.Font.Bold = wdToggle
If (DadCellPhone < "") And (MomCellPhone < "") Then
x.Selection.TypeText Text:=Left("Mc-" & MomCellPhone & " Dc-" & DadCellPhone, 33)

ElseIf (DadCellPhone = "") And (MomCellPhone < "") Then
x.Selection.TypeText Text:=Left("Mc-" & MomCellPhone & " H-" & Homephone, 33)

ElseIf (DadCellPhone < "") And (MomCellPhone = "") Then
x.Selection.TypeText Text:=Left("Dc-" & DadCellPhone & " H-" & Homephone, 33)

ElseIf (DadCellPhone = "") And (MomCellPhone = "") And (DadWorkphone < "") Then
x.Selection.TypeText Text:=Left("H-" & Homephone & " Dw-" & DadWorkphone, 33)

ElseIf (DadCellPhone = "") And (MomCellPhone = "") And (MomWorkPhone < "") Then
x.Selection.TypeText Text:=Left("H-" & Homephone & " Mw-" & MomWorkPhone, 33)

End If


The line " If (DadCellPhone < "") And (MomCellPhone < "") Then
x.Selection.TypeText Text:=Left("Mc-" & MomCellPhone & " Dc-" & DadCellPhone, 33)" is highlighted yellow and gives a refrence error but Im not sure how to go about fixing it. Any help is greatly appreciated. If you need more info please let me know. Thanks again everyone!
Reply
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
Error handling error # 1004 Run-time error [email protected] Excel Programming 3 May 20th 08 02:23 PM
How to solve Error 2023 for Excel? Eric Excel Worksheet Functions 0 July 1st 07 02:24 PM
variant/error Error 2023 bz Excel Programming 4 December 24th 06 06:22 PM
Error Handling - On Error GoTo doesn't trap error successfully David Excel Programming 9 February 16th 06 06:59 PM
Automation Error, Unknown Error. Error value - 440 Neo[_2_] Excel Programming 0 May 29th 04 05:26 AM


All times are GMT +1. The time now is 12:36 AM.

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

About Us

"It's about Microsoft Excel"