Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-09-2024, 11:23 AM
wardw wardw is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Advanced Beginner
How can I find out what keystrokes will click buttons?
 
Join Date: Oct 2012
Posts: 65
wardw is on a distinguished road
Default

Thanks, Charles and Andrew. I've encountered a more fundamental problem, it seems. I tried to create a macro I called Test1 to simply open the Styles dialog. While the macro was recording, I opened Home, then clicked the arrow in Styles to open the dialog. Then I stopped recording. The macro that appeared in VBA looks like this:

Sub Test1()


'
'Test1 Macro
'
'
End Sub

So no commands were recorded. When I closed the Styles dialog, then tried to run the macro, nothing happened.

I suspect there's a problem with dialogs and VBA. Any ideas on why this didn't record?
Reply With Quote
  #2  
Old 05-09-2024, 12:08 PM
Stefan Blom's Avatar
Stefan Blom Stefan Blom is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Moderator
 
Join Date: Aug 2011
Posts: 4,036
Stefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to allStefan Blom is a name known to all
Default

To display the Styles pane with VBA, you can use the following line of code:

Code:
Application.TaskPanes(wdTaskPaneFormatting).Visible = True
__________________
Stefan Blom
Microsoft Word MVP

Microsoft 365 apps for business
Windows 11 Professional

Last edited by Stefan Blom; 05-10-2024 at 01:58 PM.
Reply With Quote
  #3  
Old 05-10-2024, 02:30 PM
Charles Kenyon Charles Kenyon is offline How can I find out what keystrokes will click buttons? Windows 11 How can I find out what keystrokes will click buttons? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,536
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by wardw View Post
***
I tried to create a macro I called Test1 to simply open the Styles dialog. While the macro was recording, I opened Home, then clicked the arrow in Styles to open the dialog. Then I stopped recording. The macro that appeared in VBA looks like this:

Sub Test1()
'
'Test1 Macro
'
'
End Sub

So no commands were recorded. When I closed the Styles dialog, then tried to run the macro, nothing happened.

I suspect there's a problem with dialogs and VBA. Any ideas on why this didn't record?
This is how it works (or does not work). There are a number of things that the recorder will not pick up. Even those it does pick up often create poor coding.


See How to Modify a Recorded Macro by Jay Freedman.
Reply With Quote
Reply

Tags
buttons, key presses



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do animate so: click on an image, then a larger image appears, then click again & text overlaid? ship69 PowerPoint 1 09-30-2019 04:38 PM
Find drop down list entry with keystrokes Empy Excel Programming 3 06-09-2018 06:10 AM
How can I find out what keystrokes will click buttons? Hyperlink object - change ctrl+click to click? ld2x07 Word 5 10-10-2014 05:13 AM
How can I find out what keystrokes will click buttons? Getting rid of para keystrokes at the end of every line baudinot Word 1 01-05-2012 03:37 PM
Slow (delayed) keystrokes Jim Ogren Word 0 07-23-2009 07:47 PM

Other Forums: Access Forums

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