Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #35  
Old 08-22-2021, 04:45 AM
gorkac gorkac is offline Help with bookmarks in word. Windows 10 Help with bookmarks in word. Office 2019
Banned
Help with bookmarks in word.
 
Join Date: Jul 2021
Location: Usa
Posts: 62
gorkac is on a distinguished road
Default

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
Here the remaining code:
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
2.- The message does not show it if I enter a higher value:
Code:
 If lPK > 112.151 Then
MsgBox "Introduce un punto kilometrico menor que 112,151"
   End If
Reply With Quote
 



Similar Threads
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
Help with bookmarks in word. Deleting only all bookmarks contents not the bookmarks adilprodigy Word VBA 1 10-11-2017 01:31 PM
Help with bookmarks in word. Form updating Bookmarks - writes to the bookmarks multiple times PeterPlys Word VBA 13 01-14-2015 06:41 AM
Help with bookmarks in word. selecting ms word bookmarks using vba dnc Word VBA 4 05-10-2013 04:58 PM
word 2007 bookmarks Dawn Word 0 07-14-2009 01:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft