#1   Report Post  
Old April 17th 14, 10:24 PM
Junior Member
 
First recorded activity by ExcelBanter: Apr 2014
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 05:22 PM
Error Handling - On Error GoTo doesn't trap error successfully David Excel Programming 9 February 16th 06 05: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 11:33 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017