Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 312
Default Can use arrows after App.InputBox

Never mind. Focus issue. Sheet1.Select did it. Thanks anyway!

"Steph" wrote in message
...
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Up & Down Arrows Johnny Setting up and Configuration of Excel 3 May 9th 06 08:08 PM
Up/down arrows Johnny Excel Discussion (Misc queries) 1 May 8th 06 08:07 PM
auditing arrows BorisS Excel Discussion (Misc queries) 1 July 26th 05 01:03 PM
Up Arrows / Down Arrows MWH Excel Worksheet Functions 18 July 3rd 05 02:38 PM
Inputbox and Application.InputBox Maria[_7_] Excel Programming 1 September 20th 04 11:36 AM


All times are GMT +1. The time now is 08:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"