View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steph[_3_] Steph[_3_] is offline
external usenet poster
 
Posts: 312
Default Can use arrows after App.InputBox

Hi everyone. When I execute the code below, it prompts an Input box for
data entry. If I hit cancel or if I enter data into the inputbox, the arrow
keys on my keyboard no longer work. If I click on a different sheet, then
back to this one, it now works! Any idea why? Thanks.


Sub Overwrite()
Dim userid As Variant

If ActiveCell.Column < 5 Or ActiveCell.Row < 5 Then
MsgBox ("Active Cell must be on the User ID you wish to change")
Else
userid = Application.InputBox("New User ID")
If userid = False Then
Exit Sub
Else
'Unprotect HR DB
Data.Unprotect Password
ActiveCell.Value = userid
'Protect HR DB
Data.Unprotect Password
Data.Protect Password, True, True, True, True
End If
End If
End Sub