Posted to microsoft.public.excel.programming
|
|
need help
sure. (if I can figure it out <g)
--
Regards,
Tom Ogilvy
"Brian" wrote in message
...
Tom,
If i post the two the same way they appear in vb will you show me what to
remove so that they will both work?
"Tom Ogilvy" wrote:
Remove one of the macros. If they both have code, combine them
You can't have two macros in the same module with the same name and for
an
event macro to work, it must have this name.
--
Regards.
Tom Ogilvy
"Brian" wrote in message
...
i posted this original message:
I want to use VB to do the following:
if cell h10 is text then upon exit of cell h10 clear cell f10. if
cell
h10
is a number, then do nothing to cell f10. I want this to apply to
cell
h10 f10
h11 f11
h12 f12
h13 f13
The following response worked great however I am having one porblem
with
it:
Here is the response:
Try this
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row < 10 Or Target.Row 13 Then Exit Sub
Application.EnableEvents = False
If Target.Column = 8 Then
If IsNumeric(Target) = False Then
If Len(Target) 0 Then
Target.Offset(0, -2) = ""
End If
End If
End If
Application.EnableEvents = True
End Sub
Cells in the F column should remain except whn text is entered in the
H
column.
Clearing F10 etc. will have no effect.
THIS WORKED GREAT WHEN I TRIED IT ON A NEW SHEET IN A NEW WORKBOOK,
BUT
WHEN I APPPLIED IT TO MY WORKSHEET IN PROGRESS IT DID NOT WORK. I
RECEIVED
A
MESSAGE STATING AMBIGUOUS TITLE OR NAME (SOMETHING LIKE THAT IF I
RECALL)
I
DO HAVE ANOTHER MACRO WITH THE SAME HEADING AS THIS MACRO "Private Sub
Worksheet_Change(ByVal Target As Range)" THEY ARE BOTH ON SHEET 1 HOW
CAN
I
FIX THIS PROBLEM.
|