Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB script and disappearing information
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VB script and disappearing information
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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot table cutting information of a part of the information | Excel Discussion (Misc queries) | |||
Disappearing Data | Excel Discussion (Misc queries) | |||
Add-Ins Disappearing? | Excel Discussion (Misc queries) | |||
disappearing worksheets | Excel Programming | |||
Excel 2000/XP script to Excel97 script | Excel Programming |