Excel 2016 - VBA - Troubleshooting Macro that Should Work But Isn't Working?

MEUserII

Board Regular
Joined
Oct 27, 2017
Messages
91
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
Platform
  1. Windows
I have an Excel 2016 VBA macro that changes the "Office Theme" under: File>Account>Office Theme; to the next theme. This macro should work as when I try and perform the macro's sequence of actions manually the sequence of actions is successful in changing the "Office Theme" - would anyone might know why this macro isn't then working?
CODE:
Code:
Sub OfficeThemeChangeMacro()

Application.Wait (Now + TimeValue("00:00:01"))

SendKeys ("%FDY1")
Application.Wait (Now + TimeValue("00:00:01"))

SendKeys ("{DOWN}")
Application.Wait (Now + TimeValue("00:00:01"))

SendKeys ("{ENTER}")
Application.Wait (Now + TimeValue("00:00:01"))

'SendKeys ("{ESC}")
Application.Wait (Now + TimeValue("00:00:01"))

End Sub
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Would anyone with Excel 2016 try this macro to see if it works? Or can anyone tell me why this macro is not working?
 
Upvote 0
I've been tyring to figure this out, and I am still stuck on this - does anyone have any idea on why this Excel 2016 macro is not working to change the "Office Theme"?
 
Upvote 0
Have you tried using the Macro recorder and comparing it to what you have in your code.
 
Upvote 0
Have you tried using the Macro recorder and comparing it to what you have in your code.
That's the weird thing the macro recorder doesn't pick up any of these actions regardless of performing the sequence of actions by hotkey (which are the actions my posted macro executes) or by performing the same actions by mouse click. For reference, I have listed what the macro recorder records:
CODE:
Code:
Sub Macro1()
'
' Macro1 Macro
'
'
End Sub

Does anyone else have any ideas on why this posted macro is not working in Excel 2016?
 
Upvote 0
I have been trying to figure this out for a while now, and I am still stuck on this; does anyone have any ideas on why this posted macro is not working in Excel 2016?
 
Upvote 0

Forum statistics

Threads
1,215,756
Messages
6,126,685
Members
449,329
Latest member
tommyarra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top