+ Reply to Thread
Results 1 to 5 of 5

Why won't this simple VDB script work on Excel 2002.

  1. #1
    Calle
    Guest

    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


  2. #2
    Calle
    Guest

    RE: Why won't this simple VDB script work on Excel 2002.

    I mean VBA script


  3. #3
    Bob Phillips
    Guest

    Re: Why won't this simple VDB script work on Excel 2002.

    Go to Tools>References in the VBIDE on his machine, and if there are any
    checked items with MISSING in it, uncheck them.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with googlemail if mailing direct)

    "Calle" <[email protected]> wrote in message
    news:[email protected]...
    > I mean VBA script
    >




  4. #4
    Calle
    Guest

    Re: Why won't this simple VDB script work on Excel 2002.

    thx, it worked. that was the most insane bug ever....

    Calle

  5. #5
    Bob Phillips
    Guest

    Re: Why won't this simple VDB script work on Excel 2002.

    It's could be argued that it is not a bug, you had a type library referenced
    that your boss didn't, so it couldn't link it. Though why that stops things
    like Mid and Left work I suppose constitutes a bug.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with googlemail if mailing direct)

    "Calle" <[email protected]> wrote in message
    news:[email protected]...
    > thx, it worked. that was the most insane bug ever....
    >
    > Calle




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1