Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Shared Workbook
In a shared work, I would like a user to be able to double-click on a
cell in a particular column, and if the cell is blank, the user's username is entered. But if the cell has had something entered in it by another user, the program will detect that and offset to a cell below the selected one. I am getting close to what I want with the following but it is not working perfectly. Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) ActiveWorkbook.Save If Target.Column = 3 Then If Selection.Value = "" Then Selection.Value = Environ("username") Else Selection.Offset(1, 0).Select ActiveCell.Value = Environ("username") End If End If ActiveWorkbook.Save End Sub The first workbook save should make other users' entries show up on the current screen but this has not been preventing overwriting. Also, it will probably be necessary to skip more than one line with entries sometimes so I think it needs a loop of some kind. Further, it appears that cutcopy mode stays on when selection is an empty cell, but turns off when selection is a cell with something in it. Any help would be appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
shared workbook is set up is not 'shared' on network | Excel Worksheet Functions | |||
shared workbook - shared workbook options grayed out | Excel Discussion (Misc queries) | |||
Shared Workbook - Slow opening of shared workbook. | Excel Programming | |||
Printing viewing a shared workbook on a shared drive | Excel Discussion (Misc queries) | |||
update pivot in shared shared workbook | Excel Discussion (Misc queries) |