Results 1 to 31 of 31

Thread: [RESOLVED] Strange behavior with DataGrid BeforeColUpdate Event

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2016
    Posts
    24

    Resolved [RESOLVED] Strange behavior with DataGrid BeforeColUpdate Event

    Hi,

    I'm trying to run code as follows:

    Code:
    Private Sub DataGrid_BeforeColUpdate(ByVal ColIndex As Integer, OldValue As Variant, Cancel As Integer)
        Cancel = False
        DataGrid.Columns(ColIndex).Value = OldValue
    End Sub
    Taken from an example shown on the Microsoft site:
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx

    For an unknown reason, it fails to write the OldValue to the cell being edited:

    Name:  Screenshot1.jpg
Views: 2598
Size:  9.1 KB

    Name:  Screenshot2.jpg
Views: 2391
Size:  8.3 KB

    Maybe i'm being stupid, but I have no idea why it isn't working.

    Thanks,

    Hustey
    Last edited by Hustey; Aug 18th, 2017 at 09:54 AM.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width