VERSION 5.00 Begin VB.Form FormLazoPasivo BorderStyle = 1 'Fixed Single Caption = "Nuevo Lazo Pasivo" ClientHeight = 7455 ClientLeft = 45 ClientTop = 435 ClientWidth = 7200 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 7455 ScaleWidth = 7200 StartUpPosition = 2 'CenterScreen Begin VB.Frame Frame5 Caption = "Poste" Height = 1215 Left = 120 TabIndex = 49 Top = 4200 Width = 6975 Begin VB.TextBox Text22 Height = 285 Left = 5520 TabIndex = 56 Top = 280 Width = 1095 End Begin VB.CommandButton Command4 Caption = "Cambiar" Height = 375 Left = 4320 TabIndex = 54 Top = 720 Width = 1335 End Begin VB.TextBox Text21 Height = 285 Left = 1680 TabIndex = 53 Top = 740 Width = 1695 End Begin VB.TextBox Text20 Height = 285 Left = 1680 TabIndex = 51 Top = 300 Width = 1695 End Begin VB.Label Label22 Caption = "Coste (€/ud) :" Height = 255 Left = 3600 TabIndex = 55 Top = 360 Width = 1455 End Begin VB.Label Label21 Caption = "Altura (m) :" Height = 255 Left = 240 TabIndex = 52 Top = 800 Width = 1335 End Begin VB.Label Label20 Caption = "Nombre :" Height = 255 Left = 240 TabIndex = 50 Top = 360 Width = 1095 End End Begin VB.Frame Frame3 Caption = "Conductor" Height = 1695 Left = 120 TabIndex = 37 Top = 2520 Width = 6975 Begin VB.TextBox Text19 Height = 285 Left = 2160 TabIndex = 48 Top = 1260 Width = 1215 End Begin VB.TextBox Text18 Height = 285 Left = 5520 TabIndex = 46 Top = 780 Width = 1095 End Begin VB.TextBox Text17 Height = 285 Left = 1680 TabIndex = 44 Top = 780 Width = 1695 End Begin VB.CommandButton Command3 Caption = "Cambiar" Height = 375 Left = 4320 TabIndex = 42 Top = 1200 Width = 1335 End Begin VB.TextBox Text16 Height = 285 Left = 5520 TabIndex = 41 Top = 300 Width = 1095 End Begin VB.TextBox Text15 Height = 285 Left = 1680 TabIndex = 39 Top = 300 Width = 1695 End Begin VB.Label Label19 Caption = "Coste (€/km) :" Height = 255 Left = 240 TabIndex = 47 Top = 1320 Width = 1335 End Begin VB.Label Label18 Caption = "Longitud (m) :" Height = 255 Left = 3600 TabIndex = 45 Top = 840 Width = 1575 End Begin VB.Label Label17 Caption = "rgm (m) :" Height = 255 Left = 240 TabIndex = 43 Top = 840 Width = 855 End Begin VB.Label Label16 Caption = "R' (ohm/km):" Height = 255 Left = 3600 TabIndex = 40 Top = 360 Width = 1575 End Begin VB.Label Label15 Caption = "Nombre:" Height = 255 Left = 240 TabIndex = 38 Top = 360 Width = 975 End End Begin VB.CommandButton Command2 Caption = "Cancelar" Height = 375 Left = 3960 TabIndex = 13 Top = 6960 Width = 1335 End Begin VB.CommandButton Command1 Caption = "Aceptar" Height = 375 Left = 1920 TabIndex = 12 Top = 6960 Width = 1335 End Begin VB.Frame Frame2 Caption = "Localizacion" Height = 2415 Left = 3360 TabIndex = 16 Top = 120 Width = 3735 Begin VB.TextBox Text1 Height = 285 Left = 960 TabIndex = 1 Top = 420 Width = 615 End Begin VB.TextBox Text2 Height = 285 Left = 2760 TabIndex = 2 Top = 420 Width = 615 End Begin VB.TextBox Text3 Height = 285 Left = 960 TabIndex = 3 Top = 885 Width = 615 End Begin VB.TextBox Text4 Height = 285 Left = 2760 TabIndex = 4 Top = 885 Width = 615 End Begin VB.TextBox Text5 Height = 285 Left = 960 TabIndex = 5 Top = 1380 Width = 615 End Begin VB.TextBox Text6 Height = 285 Left = 2760 TabIndex = 6 Top = 1380 Width = 615 End Begin VB.TextBox Text7 Height = 285 Left = 960 TabIndex = 7 Top = 1860 Width = 615 End Begin VB.TextBox Text8 Height = 285 Left = 2760 TabIndex = 8 Top = 1860 Width = 615 End Begin VB.Label Label5 Caption = "X1 (m) :" Height = 255 Left = 120 TabIndex = 24 Top = 480 Width = 735 End Begin VB.Label Label6 Caption = "Y1 (m) :" Height = 255 Left = 1800 TabIndex = 23 Top = 480 Width = 735 End Begin VB.Label Label7 Caption = "X2 (m) :" Height = 255 Left = 120 TabIndex = 22 Top = 960 Width = 735 End Begin VB.Label Label8 Caption = "Y2 (m) :" Height = 255 Left = 1800 TabIndex = 21 Top = 960 Width = 735 End Begin VB.Label Label9 Caption = "X3 (m) :" Height = 255 Left = 120 TabIndex = 20 Top = 1440 Width = 735 End Begin VB.Label Label10 Caption = "Y3 (m) :" Height = 255 Left = 1800 TabIndex = 19 Top = 1440 Width = 735 End Begin VB.Label Label11 Caption = "X4 (m) :" Height = 255 Left = 120 TabIndex = 18 Top = 1920 Width = 735 End Begin VB.Label Label12 Caption = "Y4 (m) :" Height = 255 Left = 1800 TabIndex = 17 Top = 1920 Width = 735 End End Begin VB.Frame Frame1 Caption = "Imagen" Height = 2415 Left = 120 TabIndex = 14 Top = 120 Width = 3135 Begin VB.PictureBox Picture1 Height = 2055 Left = 120 Picture = "FormLazoPasivo.frx":0000 ScaleHeight = 1995 ScaleWidth = 2835 TabIndex = 15 Top = 240 Width = 2895 End End Begin VB.Frame Frame4 Caption = "Compensación" Height = 1455 Left = 120 TabIndex = 0 Top = 5400 Width = 6975 Begin VB.TextBox Text14 Height = 285 Left = 6120 TabIndex = 36 Top = 900 Width = 615 End Begin VB.TextBox Text13 Height = 285 Left = 4080 TabIndex = 34 Top = 900 Width = 615 End Begin VB.TextBox Text12 Height = 285 Left = 2160 TabIndex = 32 Top = 900 Width = 615 End Begin VB.OptionButton Option2 Height = 255 Left = 600 TabIndex = 30 Top = 920 Width = 495 End Begin VB.OptionButton Option1 Height = 255 Left = 600 TabIndex = 29 Top = 340 Value = -1 'True Width = 375 End Begin VB.TextBox Text11 Height = 285 Left = 6120 TabIndex = 11 Top = 300 Width = 615 End Begin VB.TextBox Text10 Height = 285 Left = 4080 TabIndex = 10 Top = 300 Width = 615 End Begin VB.TextBox Text9 Height = 285 Left = 2160 TabIndex = 9 Top = 300 Width = 615 End Begin VB.Label Label14 Caption = "Fc3" Height = 255 Left = 4920 TabIndex = 35 Top = 960 Width = 615 End Begin VB.Label Label13 Caption = "Fc2:" Height = 255 Left = 3000 TabIndex = 33 Top = 960 Width = 615 End Begin VB.Label Label4 Caption = "Fc1:" Height = 255 Left = 1080 TabIndex = 31 Top = 960 Width = 735 End Begin VB.Label Label3 Caption = "Xc3 (ohm) :" Height = 255 Left = 4920 TabIndex = 27 Top = 360 Width = 1215 End Begin VB.Label Label2 Caption = "Xc2 (ohm) :" Height = 255 Left = 3000 TabIndex = 26 Top = 360 Width = 975 End Begin VB.Label Label1 Caption = "Xc1 (ohm) :" Height = 255 Left = 1080 TabIndex = 25 Top = 360 Width = 735 End End Begin VB.Label Editando Caption = "NO" Height = 255 Left = 600 TabIndex = 28 Top = 7080 Visible = 0 'False Width = 615 End End Attribute VB_Name = "FormLazoPasivo" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim mensaje As String Public conductor As String Public poste As String Dim coma As Integer Dim comaanterior As Integer Public tipo As Integer Dim ok As Boolean Dim coinciden As Boolean Dim xx1 As Single Dim yy1 As Single Dim xx2 As Single Dim yy2 As Single Dim xx3 As Single Dim yy3 As Single Dim xx4 As Single Dim yy4 As Single Dim pisa As Boolean Dim i As Integer Private Sub Command1_Click() ok = True xx1 = CInt((FormLazoPasivo.Text1.Text - Principal.xminima) * factor) yy1 = CInt(Principal.Picturedef.Height * lineaSuelo - FormLazoPasivo.Text2.Text * factor) xx2 = CInt((FormLazoPasivo.Text3.Text - Principal.xminima) * factor) yy2 = CInt(Principal.Picturedef.Height * lineaSuelo - FormLazoPasivo.Text4.Text * factor) ' Comprobamos que no haya casillas necesarias vacias. If (Len(Text1.Text) = 0 Or Len(Text2.Text) = 0 Or Len(Text3.Text) = 0 Or Len(Text4.Text) = 0 Or _ Len(Text5.Text) = 0 Or Len(Text6.Text) = 0 Or Len(Text7.Text) = 0 Or Len(Text8.Text) = 0 Or _ Len(Text9.Text) = 0 Or Len(Text10.Text) = 0 Or Len(Text11.Text) = 0 Or Len(Text12.Text) = 0 Or _ Len(Text13.Text) = 0 Or Len(Text14.Text) = 0 Or Len(Text15.Text) = 0 Or Len(Text16.Text) = 0 Or _ Len(Text17.Text) = 0 Or Len(Text18.Text) = 0) Then ok = False If Principal.idioma = "Español" Then MsgBox "Rellene todas las casillas necesarias.", vbExclamation, "MitLoop" Else MsgBox "Please fill in all required fields.", vbExclamation, "MitLoop" End If ' Comprobar que las casillas comunes sean numericas ElseIf Not (IsNumeric(Text1.Text) And IsNumeric(Text2.Text) And IsNumeric(Text3.Text) And _ IsNumeric(Text4.Text) And IsNumeric(Text18.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "Existen valores numéricos no válidos.", vbExclamation, "MitLoop" Else MsgBox "There are non-valid numeric values.", vbExclamation, "MitLoop" End If ' Comprobamos que el simbolo para decimales es "," ElseIf (InStr(1, Text1.Text, ".") <> 0 Or InStr(1, Text2.Text, ".") <> 0 Or _ InStr(1, Text3.Text, ".") <> 0 Or InStr(1, Text4.Text, ".") <> 0 Or _ InStr(1, Text5.Text, ".") <> 0 Or InStr(1, Text6.Text, ".") <> 0 Or _ InStr(1, Text7.Text, ".") <> 0 Or InStr(1, Text8.Text, ".") <> 0 Or _ InStr(1, Text9.Text, ".") <> 0 Or InStr(1, Text10.Text, ".") <> 0 Or _ InStr(1, Text11.Text, ".") <> 0 Or InStr(1, Text12.Text, ".") <> 0 Or _ InStr(1, Text13.Text, ".") <> 0 Or InStr(1, Text14.Text, ".") <> 0 Or _ InStr(1, Text16.Text, ".") <> 0 Or InStr(1, Text17.Text, ".") <> 0 Or _ InStr(1, Text18.Text, ".") <> 0) Then ok = False If Principal.idioma = "Español" Then MsgBox "Utilice el símbolo ',' para el punto decimal.", vbExclamation, "MitLoop" Else MsgBox "Please use ',' as decimal point." End If ' Comprobamos que la longitud del lazo sea lógica ElseIf CSng(Text18.Text) <= 0 Then If Principal.idioma = "Español" Then MsgBox "¡La longitud del lazo no puede ser ceroo o negativa!", vbExclamation, "MitLoop" ok = False Else MsgBox "Loop length cannot be zero or negative!", vbExclamation, "MitLoop" ok = False End If ' ********************************************************************************************************* ' Lazo 2 conductores ElseIf (Text5.Text = "N/A" And Text7.Text = "N/A") Then ' Coordenadas validas If Not (IsNumeric(Text1.Text) And IsNumeric(Text2.Text) And IsNumeric(Text3.Text) And _ IsNumeric(Text4.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "Valores no válidos en las coordenadas del lazo.", vbExclamation, "MitLoop" Else MsgBox "There are non-valid coordinates values.", vbExclamation, "MitLoop" End If 'Que no coincidan conductores del lazo entre si ElseIf (Text5.Text = "N/A" And Text6.Text = "N/A" And (Text1.Text = Text3.Text And _ Text2.Text = Text4.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "Hay conductores superpuestos.", vbExclamation, "MitLoop" Else MsgBox "There are conductors at the same coordinates.", vbExclamation, "MitLoop" End If ' Compensacion ohmios ElseIf (Option1.Value = True And Not IsNumeric(Text9.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If ' Compensacion por unidad ElseIf (Option2.Value = True) Then If Not IsNumeric(Text12.Text) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If ElseIf (CSng(Text12.Text) < 0 Or CSng(Text12.Text) > 1) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If End If End If ' ********************************************************************************************************* ' Lazo doble conductor comun ElseIf (Text7.Text) = "N/A" Then ' Coordenadas válidas If Not (IsNumeric(Text1.Text) And IsNumeric(Text2.Text) And IsNumeric(Text3.Text) And _ IsNumeric(Text4.Text) And IsNumeric(Text5.Text) And IsNumeric(Text6.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "Valores no válidos en las coordenadas del lazo.", vbExclamation, "MitLoop" Else MsgBox "There are non-valid coordinates values.", vbExclamation, "MitLoop" End If ' Que no coincidan conductores del lazo entre si ElseIf (Text7.Text = "N/A" And ((Text1.Text = Text3.Text And Text2.Text = Text4.Text) Or _ (Text1.Text = Text5.Text And Text2.Text = Text6.Text) Or _ (Text3.Text = Text5.Text And Text4.Text = Text6.Text))) Then ok = False If Principal.idioma = "Español" Then MsgBox "Hay conductores superpuestos.", vbExclamation, "MitLoop" Else MsgBox "There are conductors at the same coordinates.", vbExclamation, "MitLoop" End If ' Compensacion ohmios ElseIf (Option1.Value = True) Then If Not (IsNumeric(Text9.Text) And IsNumeric(Text10.Text) And _ IsNumeric(Text11.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If End If ' Compensacion por unidad ElseIf (Option2.Value = True) Then If Not (IsNumeric(Text12.Text) And IsNumeric(Text13.Text) And _ IsNumeric(Text14.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If ElseIf ((CSng(Text12.Text) < 0 Or CSng(Text12.Text) > 1) Or _ CSng(Text13.Text) < 0 Or CSng(Text13.Text) > 1 Or CSng(Text14.Text) < 0 Or _ CSng(Text14.Text) > 1) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If End If End If '******************************************************************************************************** ' Lazo doble ElseIf ((Text5.Text <> "N/A" And Text7.Text <> "N/A") And Text10.Text = "N/A") Then ' Coordenadas válidas If Not (IsNumeric(Text1.Text) And IsNumeric(Text2.Text) And IsNumeric(Text3.Text) And _ IsNumeric(Text4.Text) And IsNumeric(Text5.Text) And IsNumeric(Text6.Text) And _ IsNumeric(Text7.Text) And IsNumeric(Text8.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "Valores no válidos en las coordenadas del lazo.", vbExclamation, "MitLoop" Else MsgBox "There are non-valid coordinates values.", vbExclamation, "MitLoop" End If ' Que no coincidan conductores del lazo entre si ElseIf ((Text1.Text = Text3.Text And Text2.Text = Text4.Text) Or _ (Text1.Text = Text5.Text And Text2.Text = Text6.Text) Or _ (Text1.Text = Text7.Text And Text2.Text = Text8.Text) Or _ (Text3.Text = Text5.Text And Text4.Text = Text6.Text) Or _ (Text3.Text = Text7.Text And Text4.Text = Text8.Text) Or _ (Text5.Text = Text7.Text And Text6.Text = Text8.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "Hay conductores superpuestos.", vbExclamation, "MitLoop" Else MsgBox "There are conductors at the same coordinates.", vbExclamation, "MitLoop" End If ' Compensacion ohmios ElseIf (Option1.Value = True) Then If Not (IsNumeric(Text9.Text) And IsNumeric(Text11.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If End If ' Compensacion por unidad ElseIf (Option2.Value = True) Then If Not (IsNumeric(Text12.Text) And IsNumeric(Text14.Text)) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If ElseIf ((CSng(Text12.Text) < 0 Or CSng(Text12.Text) > 1) Or _ CSng(Text14.Text) < 0 Or CSng(Text14.Text) > 1) Then ok = False If Principal.idioma = "Español" Then MsgBox "El valor de la compensación no es válido", vbExclamation, "MitLoop" Else MsgBox "Compensation value is not valid.", vbExclamation, "MitLoop" End If End If ElseIf (Text7.Text <> "N/A" And Text5.Text <> "N/A" And ((Text1.Text = Text3.Text And _ Text2.Text = Text4.Text) Or (Text1.Text = Text5.Text And _ Text2.Text = Text6.Text) Or (Text1.Text = Text7.Text And _ Text2.Text = Text8.Text) Or (Text3.Text = Text5.Text And _ Text4.Text = Text6.Text) Or (Text3.Text = Text7.Text And _ Text4.Text = Text8.Text) Or (Text5.Text = Text7.Text And _ Text6.Text = Text8.Text))) Then ok = False If Principal.idioma = "Español" Then MsgBox "Hay conductores superpuestos.", vbExclamation, "MitLoop" Else MsgBox "There are conductors at the same coordinates.", vbExclamation, "MitLoop" End If End If End If '************************************************************************************************** 'Si no ha habido ningun problema grave, se continúa. If (ok = True) Then If Editando = "NO" Then Module1.añadeLazoPasivo Else Me.Hide End If End If End Sub Private Sub Command2_Click() Module1.RedibujaImagen Module1.HaCancelado = True conductor = "" Unload Me End Sub Private Sub Command3_Click() ' Boton de cambiar conductor Load SelConductor SelConductor.soloDimeConductor = True SelConductor.Show vbModal SelConductor.soloDimeConductor = False Unload SelConductor ' Ahora tendremos en conductor los datos del nuevo conductor If Len(conductor) > 0 Then ponDatosConductor (conductor) End If End Sub Private Sub Command4_Click() ' Cambiamos de poste de lazo Load SelPoste SelPoste.soloDimeConductor = True SelPoste.quienLlamo = "Pasivo" SelPoste.Show vbModal SelPoste.soloDimeConductor = False SelPoste.quienLlamo = "" Unload SelPoste ' Ahora tendremos en conductor los datos del nuevo conductor If Len(poste) > 0 Then ponDatosPoste (poste) End If End Sub Private Sub Form_Load() If Principal.idioma = "Español" Then Frame1.Caption = "Imagen" Frame2.Caption = "Localización" Frame3.Caption = "Conductor" Frame4.Caption = "Compensación" Frame5.Caption = "Poste" Label15.Caption = "Nombre :" Label18.Caption = "Longitud (m) :" Label19.Caption = "Coste (€/km) :" Label20.Caption = "Nombre :" Label21.Caption = "Altura (m) :" Label22.Caption = "Coste (€/ud) :" Command1.Caption = "Aceptar" Command2.Caption = "Cancelar" Command3.Caption = "Cambiar" Command4.Caption = "Cambiar" Else Frame1.Caption = "Image" Frame2.Caption = "Location" Frame3.Caption = "Conductor" Frame4.Caption = "Compensation" Frame5.Caption = "Tower" Label15.Caption = "Name" Label18.Caption = "Length (m) :" Label19.Caption = "Cost (€/km) :" Label20.Caption = "Name :" Label21.Caption = "Height (m) :" Label22.Caption = "Cost (€/ud) :" Command1.Caption = "OK" Command2.Caption = "Cancel" Command3.Caption = "Change" Command4.Caption = "Change" End If If SelLazo.Option1.Value = True Then Text1.Text = "-12" Text2.Text = "12" Text3.Text = "12" Text4.Text = "12" Text5.Enabled = False Text5.Text = "N/A" Text6.Enabled = False Text6.Text = "N/A" Text7.Enabled = False Text7.Text = "N/A" Text8.Enabled = False Text8.Text = "N/A" Text9.Enabled = True Text9.Text = "" Text10.Enabled = False Text10.Text = "N/A" Text11.Enabled = False Text11.Text = "N/A" Text12.Enabled = False Text12.Text = "N/A" Text13.Enabled = False Text13.Text = "N/A" Text14.Enabled = False Text14.Text = "N/A" ElseIf SelLazo.Option2.Value = True Then Text1.Text = "-12" Text2.Text = "12" Text3.Text = "0" Text4.Text = "12" Text5.Text = "12" Text6.Text = "12" Text7.Enabled = False Text7.Text = "N/A" Text8.Enabled = False Text8.Text = "N/A" Text9.Enabled = True Text10.Enabled = True Text11.Enabled = True Text9.Text = "" Text10.Text = "" Text11.Text = "" Text12.Enabled = False Text13.Enabled = False Text14.Enabled = False Text12.Text = "N/A" Text13.Text = "N/A" Text14.Text = "N/A" Else Text1.Text = "-12" Text2.Text = "12" Text3.Text = "-4" Text4.Text = "12" Text5.Text = "4" Text6.Text = "12" Text7.Text = "12" Text8.Text = "12" Text9.Text = "" Text11.Text = "" Text11.Enabled = True Text10.Enabled = False Text10.Text = "N/A" Text12.Enabled = False Text13.Enabled = False Text14.Enabled = False Text12.Text = "N/A" Text13.Text = "N/A" Text14.Text = "N/A" End If If (Editando = "NO" And Len(conductor) > 1) Then ponDatosConductor (conductor) End If If (Editando = "NO" And Len(poste) > 1) Then ponDatosPoste (poste) End If End Sub Private Sub Option1_Click() Text12.Enabled = False Text12.Text = "N/A" Text13.Enabled = False Text13.Text = "N/A" Text14.Enabled = False Text14.Text = "N/A" Text9.Enabled = True Text9.Text = "" If (Text5.Text <> "N/A" And Text7.Text = "N/A") Then ' Lazo doble cond comun Text10.Enabled = True Text10.Text = "" Text11.Enabled = True Text11.Text = "" ElseIf (Text7.Text <> "N/A") Then Text11.Enabled = True Text11.Text = "" End If End Sub Private Sub Option2_Click() Text9.Enabled = False Text9.Text = "N/A" Text10.Enabled = False Text10.Text = "N/A" Text11.Enabled = False Text11.Text = "N/A" Text12.Enabled = True Text12.Text = "0,6" If (Text5.Text <> "N/A" And Text7.Text = "N/A") Then ' Lazo doble cond comun Text13.Enabled = True Text13.Text = "0,6" Text14.Enabled = True Text14.Text = "0,6" ElseIf (Text7.Text <> "N/A") Then Text13.Enabled = False Text13.Text = "N/A" Text14.Enabled = True Text14.Text = "0,6" End If End Sub Sub ponDatosPoste(ByVal cadena As String) ' Tipo comaanterior = 1 coma = InStr(1, cadena, ";") Text20.Text = Trim(Mid(cadena, 1, coma - 1)) ' Altura comaanterior = coma + 1 coma = InStr(comaanterior, cadena, ";") Text21.Text = Trim(Mid(cadena, comaanterior, coma - comaanterior)) ' Precio comaanterior = coma + 1 coma = InStr(comaanterior, cadena, ":") If coma = 0 Then coma = Len(cadena) Text22.Text = Trim(Mid(cadena, comaanterior, coma - comaanterior)) End Sub Sub ponDatosConductor(ByVal cadena As String) comaanterior = 1 coma = InStr(1, conductor, ";") Text15.Text = Trim(Mid(conductor, 1, coma - 1)) comaanterior = coma + 1 coma = InStr(comaanterior, conductor, ";") Text16.Text = Trim(Mid(conductor, comaanterior, coma - comaanterior)) comaanterior = coma + 1 coma = InStr(comaanterior, conductor, ";") If coma = 0 Then coma = Len(conductor) Text17.Text = Trim(Mid(conductor, comaanterior, coma - comaanterior)) comaanterior = coma + 1 coma = InStr(comaanterior, conductor, ":") If coma = 0 Then coma = Len(conductor) Text19.Text = Trim(Mid(conductor, comaanterior, coma - comaanterior)) End Sub