Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-21-2024, 10:43 AM
gmaxey gmaxey is offline Change Focus From Userform After Click Windows 10 Change Focus From Userform After Click 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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Focus From Userform After Click Hyperlink object - change ctrl+click to click? ld2x07 Word 5 10-10-2014 05:13 AM
Change focus from userForm back to word document to see results. Hank Smith Word VBA 1 08-11-2014 05:00 AM
Change Focus From Userform After Click Show userform without losing document focus? Or other method to get a graphic to pop? AlexR Word VBA 7 03-31-2013 12:17 PM
Title: Why does focus fail to change to MyPic2.jpg (intermittently) after .addPictur CatMan PowerPoint 6 05-10-2012 10:25 PM
Change Focus From Userform After Click Setting focus to specific word document from UserForm SaneMan Word VBA 5 04-01-2011 03:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:29 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