View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Abi Abi is offline
external usenet poster
 
Posts: 20
Default VB script and disappearing information

Thank you!

"Tom Ogilvy" wrote:

Private Sub Worksheet_Change(ByVal Target As Range)
if Target.count 1 then exit sub
if Target.Address = "$B$208" then
Application.EnableEvents = False
If Range("B208") = 1 Then
Range("B208") = "One-Man"
ElseIf Range("B208") = 2 Then
Range("B208") = "Two-Man"
Else
Range("B208") = ""
End If
Application.EnableEvents = True
End If
End Sub

--
Regards,
Tom Ogilvy

"Abi" wrote in message
...
I'm using the following script to make it easier on users when they enter
data. Instead of them having to tpye "One-Man" or "Two-Man" they type 1

or 2
and it the coinciding phrase appears instead.

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Range("B208") = 1 Then
Range("B208") = "One-Man"
ElseIf Range("B208") = 2 Then
Range("B208") = "Two-Man"
Else
Range("B208") = ""
End If
Application.EnableEvents = True
End Sub

The users are entering data in the B column of one sheet and that info
filters through to other sheets. The one-man two-man info is entered into
B208. Directly below that are other cells that need to have information
entered into them. However, when I enter the information in cell B209, or
B210, etc., it deletes the information out of cell B208.

Can anyone tell me what's going on, and how I can fix it? Thanks!