Excel 2013 Macro to Rotate Windows Screen (CTRL+ALT+ARROW)

nirvehex

Active Member
Joined
Jul 27, 2011
Messages
493
Office Version
  1. 365
Platform
  1. Windows
Hey I'm trying to play a prank on a coworker. Can anyone help me out in creating a simple macro that flips the windows screen down or left or right? I've looked around on here and can't find any actual code that works.

Any ideas?

Thanks!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Nevermind...figured it out.

Code:
SendKeys "^%{DOWN}"

This flips it upside down! Such a good prank in the office!
 
Upvote 0
If you just need within Excel, then use this code:
Code:
Private Sub Workbook_Open()

SendKeys "^%{RIGHT}"

End Sub

Just place it in the ThisWorkbook module.

Or, another method is to create a .vbs script and use this:
Code:
Set WshShell = WScript.CreateObject("WScript.Shell") 
WScript.Sleep 500

WshShell.Sendkeys "^%{RIGHT}"

To create a vbs script, open Notepad (or any similar editor) and place the above code. Then save the file as filename.vbs. You may have to change the Save As File Type to All files. Once saved, it can be run by double-clicking, or, if you have access to their computer, activate it via a scheduled task. That can be fun too. Set a random time and all of a sudden their screen rotates.
 
Upvote 0

Forum statistics

Threads
1,203,069
Messages
6,053,347
Members
444,654
Latest member
Rich Cohen

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