blacking out screen

alfordtp

Board Regular
Joined
Oct 3, 2008
Messages
62
When presenting a spreadsheet to a class, I would like to blackout the screen/projector at times so I can use the white board behind the projection.

In powerpoint, there is a shortcut by typing "B" during a presentation and it blackouts the screen.

I wrote a quick and dirty macro to do this:

Code:
Sub blackout()

If Cells(2, 2).Interior.ColorIndex <> 1 Then
Cells.Select
Selection.Interior.ColorIndex = 1
Cells(1, 1).Select
Else
Cells.Select
Selection.Interior.ColorIndex = Clear
Cells(1, 1).Select
End If

End Sub

This works unless there is formatting present in the document already. In that case, it clears the formatting.

Any ideas to blackout on a keystroke, then return to previous formatting on "un-blackout"?
 
alfordtp,

Equally quick and at least as dirty......

With some unused columns say AA:BL format the whole columns black. ( or edit the code to format/ unformat each time it is called?)
Code:
Sub blackout2()

If ActiveWindow.ScrollColumn = 27 Then
ActiveWindow.ScrollColumn = 1 
Else
ActiveWindow.ScrollColumn = 27
End If


End Sub
Hope that helps.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,226,895
Messages
6,193,549
Members
453,807
Latest member
PKruger

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