Still need help - Clear a cell upon workbook Close

G

Gary

The subroutine did not run as I received the Macro Disabled message. I
clicked OK, and next time I opened the workbook, I didn't get the Macro
Warning, but the subroutine apparently didn't run as the chosen cells were
not blank.

I don't want people who use my workbook to have to deal with macro warnings.
Is this something that must be set on each user's computer, or can I set it
in my workbook so the subroutine automatically runs on everyone's computer?

Do I need to get a Certificate?

Here's my code. Are the () and the " " necessary? I'm working in Sheet 8 and
want Cells A124 and A125 to clear upon Close.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet8").Range("A124").ClearContents
Sheets("Sheet8").Range("A125").ClearContents
End Sub
 
G

Gary

Thanks! Sorry about the duplicate post of my question. I didn't see the first
one in my list so I asked it again. Discovered later I needed to expand my
Notifications to see all my questions. You've been helpful!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top