Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-22-2011, 04:26 AM
tinfanide tinfanide is offline Word VBA: How to create a command button and trigger a function? Windows 7 64bit Word VBA: How to create a command button and trigger a function? Office 2010 32bit
Expert
Word VBA: How to create a command button and trigger a function?
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Word VBA: How to create a command button and trigger a function?


Code:
Private Sub CommandButton1_Click()

Selection.Font.Color = wdColorRed

End Sub
I couldn't link the command button with the below codes.
How can I create a command button to do the things below?

Code:
Selection.Font.Color = wdColorRed
    Selection.Font.Bold = wdToggle
    If Selection.Font.Underline = wdUnderlineNone Then
        Selection.Font.Underline = wdUnderlineSingle
    Else
        Selection.Font.Underline = wdUnderlineNone
    End If
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Check Boxes and Command Buttons Micky P Word VBA 0 10-27-2011 01:06 AM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
Word VBA: How to create a command button and trigger a function? Launch macro sub after hitting "create pdf" button in word webharvest Word VBA 1 06-29-2011 04:56 PM
Desperatly need help in trigger animations quinn307 PowerPoint 0 03-27-2011 08:52 PM
Word VBA: How to create a command button and trigger a function? Command Button cksm4 Word VBA 7 02-27-2011 08:47 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:14 AM.


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