VBA Macro to Stop PC from going to Sleep

excelmatt

New Member
Joined
Feb 15, 2012
Messages
8
Hello All,

For numerous reasons I am unable to prevent my screen from going to sleep during periods of inactivity. It is still being used to watch a live spreadsheet though. Is there a way I can write a macro to move the mouse, or do some action so that the pc thinks it is being used.

I am thinking of using some kind of timeserial command to press a button every 5 minutes or so. Would this work or do you know a better way?

Thanks,
Matt :)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
hi excelmatt
goto control panel
click the performance information and tools icon
click the adjust power settings
click the change when computer sleeps
in the drop down box select never
i am using windows 7 if you are not it will be something like the above
cheers

kevin
 
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,842
Members
449,471
Latest member
lachbee

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