+ Reply to Thread
Results 1 to 2 of 2

VBA Macro not working

  1. #1
    Registered User
    Join Date
    11-16-2018
    Location
    Nairobi
    MS-Off Ver
    2016
    Posts
    1

    VBA Macro not working

    Hi
    I have two lists in my excel sheet one in H2 and corresponding list in I2. whenever I change value in H2 the I2 value changing as well however I2 cell not get blank. I written below code to do so in VBA module however it is not working not even going to read it I tried putting prompt messages as well.

    Private Sub Worksheet_Change(ByVal Target As Range)
    On Error Resume Next
    If Target.Column = 9 Then
    If Target.Validation.Type = 8 Then
    Application.EnableEvents = False
    Target.Offset(0, 1).ClearContents
    End If
    End If
    exitHandler:
    Application.EnableEvents = True
    Exit Sub
    End Sub

    My macro setting is "Enable all macros(not recommended......)"

    Thanks,
    Sanjay

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Macro not working

    Column H = 8
    Column I = 9

    so seems you make J2 blank

    kind regards
    Leo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro working in windows machine but not working in MAC
    By amitmodi_mrt in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 5
    Last Post: 11-16-2017, 11:26 AM
  2. [SOLVED] Macro working in windows machine but not working in MAC
    By amitmodi_mrt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2017, 02:12 PM
  3. Copied working macro to new workbook, but no longer working
    By twisted31 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2017, 06:17 PM
  4. [SOLVED] Macro working perfectly on MS office x86 but not working on x64
    By alexgoaga in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-26-2017, 05:04 AM
  5. Well working simple macro now not working-open folder
    By jomili in forum Word Programming / VBA / Macros
    Replies: 6
    Last Post: 07-05-2017, 08:24 AM
  6. [SOLVED] help index and match macro not working but formula working??
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-28-2016, 06:37 AM
  7. Hide Columns Macro - Working on Windows not working on Mac OSX
    By bcadar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-08-2016, 09:05 AM

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