View Single Post
 
Old 09-21-2024, 10:43 AM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

I'm assuming you must be displaying the form with .Show vbModeless.


In each command button event. Add Application.Activate


Private Sub CommandButton1_Click()
Selection.Cells(1).Shading.BackgroundPatternColor = wdColorAqua
Application.Activate
End Sub
Private Sub CommandButton2_Click()
Selection.Cells(1).Shading.BackgroundPatternColor = wdColorBlue
Application.Activate
End Sub
Private Sub CommandButton3_Click()
Selection.Cells(1).Shading.BackgroundPatternColor = wdColorBrightGreen
Application.Activate
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote