![]() |
#35
|
|||
|
|||
![]()
Aaargh...
Two problems appear. 1.- The bookmarks "termino" and "partido" are not filled. Code:
Case Is = "AP-15" Rellenar "denominacion", "Autopista de Navarra" If lPK >= 0 And lPK <= 1.225 Then Rellenar "termino", "Corella" Rellenar "partido", "Tudela" End If Code:
Public Sub Rellenar(strNombreMarcador As String, strValor As String) 'Gorka Cuairan. Función que rellena marcadores Dim Rng As Range With ActiveDocument On Error GoTo lbl_Exit Set Rng = .Bookmarks(strNombreMarcador).Range Rng.Text = strValor Rng.Bookmarks.Add strNombreMarcador End With lbl_Exit: Set Rng = Nothing Exit Sub End Sub Private Sub Userform_Activate() 'FORMULARIO, CARGA VIA Call Carreteras.CargarCarreteras(cbovia) End Sub Public Sub CommandButton1_Click() 'BOTON Aceptar' ' Uso la funcion Rellenar Rellenar "via", cbovia.Text ' Asigno valor introducido en combo cbovia Rellenar "kilometro", txtpk.Text ' Asigno valor en textbox kilometro Dim sVia As String Dim lPK As String sVia = cbovia.Text lPK = txtpk.Value lbl_Exit: Exit Sub End Sub Code:
If lPK > 112.151 Then MsgBox "Introduce un punto kilometrico menor que 112,151" End If |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Saving a word doc as a pdf with bookmarks | MimiCush | Word | 10 | 03-26-2018 01:51 PM |
![]() |
adilprodigy | Word VBA | 1 | 10-11-2017 01:31 PM |
![]() |
PeterPlys | Word VBA | 13 | 01-14-2015 06:41 AM |
![]() |
dnc | Word VBA | 4 | 05-10-2013 04:58 PM |
word 2007 bookmarks | Dawn | Word | 0 | 07-14-2009 01:00 PM |