LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Why won't this simple VDB script work on Excel 2002.

I made a script with help from members on this forum in excel 2003. Now I
sent it to my boss and it doesnt work on his machine. I have also tried it
now on excel 2002 and it wont work.

What am I doing wrong? I get an error message that it can't compile and that
it can't find project or library...
Script:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)

Dim myRng As Range

Set myRng = Me.Range("I16,I19,E27,G24")

With Target
If .Cells.Count 1 Then Exit Sub
If Intersect(.Cells, myRng) Is Nothing Then Exit Sub
If .Value = "" Then Exit Sub

Select Case LCase(.Address(0, 0))
Case Is = "i16"
If LCase(.Value) = LCase("klicka här fär utrustning") Then
'skipit
Else
If LCase(.Value) = LCase("rensa val") Then
Selection.Offset(1, -2).ClearContents
Selection.Offset(0, 0).ClearContents
Else
Application.EnableEvents = False
Me.Range("G17").Value = Me.Range("G17").Value & .Value
..ClearContents
Application.EnableEvents = True
End If
End If
Case Is = "i19"
If LCase(.Value) = LCase("klicka här fär utrustning") Then
Else
If LCase(.Value) = LCase("rensa val") Then
Selection.Offset(1, -2).ClearContents
Selection.Offset(0, 0).ClearContents
Else
Application.EnableEvents = False
Me.Range("G20").Value = Me.Range("G20").Value & .Value
..ClearContents
Application.EnableEvents = True
End If
End If
Case Is = "e27"
If LCase(.Value) = LCase("ej tröskel") Then
Selection.Offset(1, 0).ClearContents
Selection.Offset(2, 0).ClearContents
End If
End Select
End With
End Sub

 
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
simple vb script to open, refina Excel Discussion (Misc queries) 0 June 14th 08 07:37 PM
Why won't this simple VBA script work in excel 2002? Calle Excel Discussion (Misc queries) 1 May 29th 06 12:21 PM
Simple Macro, works in Excel 2002, 2003 but won't work in 2000 DJA[_2_] Excel Programming 5 September 28th 05 05:10 PM
Simple formulas in existing Excel 2002 no longer working. AllieB Excel Worksheet Functions 3 May 3rd 05 04:14 PM
Need help with simple VBA Script Donald Parker Excel Programming 7 January 25th 04 10:19 PM


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

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

About Us

"It's about Microsoft Excel"