Results 1 to 9 of 9

Thread: changing cells based on dates

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    BoardCoder
    Licensed Coder
    VBAX Expert mark007's Avatar
    Joined
    May 2004
    Location
    Leeds, UK
    Posts
    620
    Location
    Ah ok. In that case you need to look at the worksheet_change evnt. You've actually made up and event. The events available for the worksheet object can be found by seleceting the worksheet in the top left dropdown of the codewindow. The evnts will then be listed in the top right drop down.

    On selecting the change event the stub will be created for you.

    You could then use soemthing like:


    if target.column=11 then 'i.e. column K
        if range("H" & target.row)<>"" then 'column H isn't blank
            if target.value<range("H" & target.row).value then msgbox "Should be a value greater than column H"
       end if
    end if

    and similar for column N.

    Last edited by Aussiebear; 04-29-2023 at 09:47 PM. Reason: Adjusted the code tags
    "Computers are useless. They can only give you answers." - Pablo Picasso
    Mark Rowlinson FIA | The Code Net

Posting Permissions

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