Clear Contents of Cell Range Upon Opening Workbook

Was wondering if someone could provide me with a macro that clears the contents of a cell range (within a workbook) immediately upon being opened by the user.

Basically the user will never know what has happened.

Clear content code is fairly straightforward, but getting it done as soon as a workbook is opened is not so (for me anyway)...

Thanks

September 2nd, 2015 8:50am

Figured it out....piece of pi$$ really :-)

Private Sub Workbook_Open() 'change C6 to your desired cell Range("C6").Select Selection.ClearContents End Sub

  • Marked as answer by ShaikhF 18 hours 35 minutes ago
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 8:58am

Figured it out....piece of pi$$ really :-)

Private Sub Workbook_Open() 'change C6 to your desired cell Range("C6").Select Selection.ClearContents End Sub

  • Marked as answer by ShaikhF Wednesday, September 02, 2015 12:57 PM
September 2nd, 2015 12:57pm

Hi,

Thanks for visiting our forum and sharing your experience here. It'll be benefited to our communicator.

If you have further question about macro, you can ask in MSDN forum:

https://social.technet.microsoft.com/Forums/en-US/121dded7-7bda-4bcd-b656-55661f9b243d/macro-in-excel-2010-running-10-times-slower?forum=excel

Have a good time.

Regards,

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 10:49pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics