Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the following procedure run when I open up a particular file,
which will display for me the user name within Excel. I have the sheet protected etc so it can't be tampered with. But I'm hitting a Compile, I just don't understand these With, End With's Private Sub Workbook_Open() For Each sh In ActiveWorkbook.Worksheets On Error Resume Next sh.Unprotect Password = "1234" Cells(6, 3).Value = Application.UserName sh.Protect Password = "1234" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I stop blank workbook from opening when opening an existing | Excel Discussion (Misc queries) | |||
excel VBA problem - setting workbook as variable & opening/re-opening | Excel Programming | |||
How to make the opening of a workbook conditional upon the opening of another workbook | Excel Programming | |||
How to make opening of workbook conditional of opening of another workbook | Excel Programming | |||
Preventing opening workbook inside active workbook. | Excel Programming |