Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sub Not Working
Here's the code I'm working with...
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Application.UserName < rcj Then Cancel = True MsgBox "Sorry, But You Don't Have Permission To Save This File", vbExclamation, "Invalid Permission" End If MsgBox Application.UserName End Sub I get the error and it doesn't save, but if I use ... Application.UserName = rcj Then I get to save but that's backwards I want it to elvaluate what the username is and if it's not my username than it cancels the save and lets the user know. Why is it working backwards? Thanks, Rob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculate working days but change working week | Excel Discussion (Misc queries) | |||
Making weekend days working days - the system cuts the working tim | Excel Discussion (Misc queries) | |||
macro was working, now it's not working | Excel Programming | |||
Macro working in Excel 2003; not working in Excel 2000 | Excel Programming | |||
Adding sales from a non working day to the previous working day | Excel Programming |