Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error handling error # 1004 Run-time error | Excel Programming | |||
How to solve Error 2023 for Excel? | Excel Worksheet Functions | |||
variant/error Error 2023 | Excel Programming | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
Automation Error, Unknown Error. Error value - 440 | Excel Programming |