Consulting

Results 1 to 17 of 17

Thread: Solved: Glitch in Macro

  1. #1
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location

    Solved: Glitch in Macro

    This coding was provided by "XLD", thanks Bob. Follow this VBAExpress thread http://www.vbaexpress.com/forum/showthread.php?t=18645 to get an idea of what the coding is suppose to do. The glitch comes up when player 3's number, 33, is entered into cell C29. The number 33 should've gone into cell N36, but instead it went into cell AO37. What is odd is that players 1 and 2 numbers went into their correct cells and the rest of the coding seems to be working correctly. It's "My Bad" for not checking the original coding in the attached VBAExpress thread that Bob provided. The error with the coding shows up in the original thread too.

    Best regards,

    Charlie
    Best regards,

    Charlie

    I need all the I can get....

  2. #2
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    Does anyone have an idea of why this glitch is happening??? I would greatly appreciate anyones help with this.

    Best regards,

    Charlie
    Best regards,

    Charlie

    I need all the I can get....

  3. #3
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    I tried the macro on a new workbook/worksheet and the same thing happens... after the second player's information the third player's first number goes into the second player's information. This is really frustrating...

    Best regards,

    Charlie
    Best regards,

    Charlie

    I need all the I can get....

  4. #4
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    If there'a no solution to the current glitch in this macro is there another macro that can do what I need it to do???

    Best regards,

    Charlie
    Best regards,

    Charlie

    I need all the I can get....

  5. #5
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    It doesn't seem like there's a solution to this macro glitch. I'm going to start a new thread to readdress what I need in this particular macro.

    Best regards to all,

    Charlie
    Best regards,

    Charlie

    I need all the I can get....

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Does this do it

    [vba]

    Private Sub Worksheet_Change(ByVal Target As Range)
    Const WS_RANGE As String = "C10:C117"
    Dim mpStart As Range

    On Error GoTo ws_exit
    Application.EnableEvents = False

    If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then

    With Target

    If .Row > 10 And .Row < 118 And .Row Mod 9 <> 1 Then

    Set mpStart = Range("F" & (.Row \ 9 + 1) * 9)
    End If

    For i = 1 To 9

    If mpStart.Offset(0, (i - 1) * 9 + 8).Value = "" Then

    mpStart.Offset(0, (i - 1) * 9 + 8).Value = Target.Value
    Exit For
    End If
    Next i
    End With
    End If

    ws_exit:
    Application.EnableEvents = True
    End Sub
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    Bob thanks for your suggestion. Along with your idea I had to make a couple of others and I think it now works like I want it to. Thanks again.
    Best regards,

    Charlie

    I need all the I can get....

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I can't see any changes to Sheet1, and still doesn't work properly.

    I get a compile error on ScoreCard (2).

    I can't see the changes I suggested, so what have you done?

    Don't you also need some delete code, shunt the data along if a value is cleared.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  9. #9
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    Let's try this one..
    Best regards,

    Charlie

    I need all the I can get....

  10. #10
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    So did you see my other suggestion?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  11. #11
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    Are you referring to this???
    Don't you also need some delete code, shunt the data along if a value is cleared.
    Best regards,

    Charlie
    Best regards,

    Charlie

    I need all the I can get....

  12. #12
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    Bob I'm always interested in hearing your thoughts on improving something.
    Best regards,

    Charlie

    I need all the I can get....

  13. #13
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    That's the one.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  14. #14
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    The player's number would only appear if they were in the game and batting. If I needed to remove a player's number I have a clear contents macro in a toolbar that I can use.
    Best regards,

    Charlie

    I need all the I can get....

  15. #15
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    The player's number would only appear if they were in the game and batting. If I needed to remove a player's number I have a clear contents macro in a toolbar that I can use.
    Best regards,

    Charlie

    I need all the I can get....

  16. #16
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    OK, just a thought. I certainly needed it when I was testing the code yesterday.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  17. #17
    VBAX Expert
    Joined
    May 2006
    Location
    Oklahoma City, OK
    Posts
    532
    Location
    Bob if you still have the coding I'll take a look at it?
    Best regards,

    Charlie

    I need all the I can get....

Posting Permissions

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