Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following macro works partially...
--------------------------------------- Private Sub Workbook_Open() On Error GoTo Workbook_Open_Error If Worksheets("Audit").Range("E2").Value = "New" Then Worksheets("Audit").Range("A2").Value = Application.UserName Worksheets("Audit").Range("B2").Value = Date Worksheets("Audit").Range("C2").Value = Time Randomize Worksheets("Audit").Range("D2").Value = Rnd() ....up to here, but the next two lines don't do anything. They are supposed to protect with a random password, and then hide the sheet.... Worksheets("Audit").Protect Password:="A" & Int(Rnd() * 10000000000#) Worksheets("Audit").Visible = False End If GoTo Workbook_Open_Complete Workbook_Open_Error: MsgBox "Error in Workbook_Open" Workbook_Open_Complete: End Sub --------------------------------------- Can someone give me some clues? I'm sure this worked yesterday! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook_Open macro not running | Excel Discussion (Misc queries) | |||
Disable Workbook_Open() Macro | Excel Programming | |||
Prevent Workbook_Open macro | Excel Programming | |||
Workbook_Open & Macro | Excel Programming | |||
Workbook_Open macro created in Excel 97 problems on MAC | Excel Programming |