Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Word Macro VBA

  • 17-08-2007 9:41am
    #1
    Registered Users, Registered Users 2 Posts: 7,990 ✭✭✭


    I am trying to write a macro that will load a form.

    I can figure out how to populate text and show the vb editor but not display a form when a button is pressed on the toolbar.

    Can anyone help please
    
    Sub displayText()
    '
    ' displayTextMacro
    ' Macro recorded 17/08/2007 by Trampas'
        Selection.TypeText Text:="Hello"
    
    End Sub
    
    
    Sub displayVBEd()
    '
    ' displayVBEdMacro
    ' Macro recorded 17/08/2007 by Trampas''
        ShowVisualBasicEditor = True
    
    End Sub
    
    

    The template can't be in the Normal.dot but can be referenced from it.

    Can someone direct me in the right direction please.

    Thanks
    Gareth


Comments

  • Closed Accounts Posts: 18,056 ✭✭✭✭BostonB


    Its bad practise to use the normal.dot. Create a new template.dot and write it in that. In the VB editor add a new module to this template to write your code in. You have to create a userform and then write some code to load it.
    TrampasForm.Show


Advertisement