Consulting

Results 1 to 8 of 8

Thread: A1 RECTANGULAR B1 APPLY

  1. #1
    VBAX Newbie
    Joined
    Sep 2023
    Posts
    4
    Location

    A1 RECTANGULAR B1 APPLY

    DEAR SIRS,  
    could you please give me a VBA code in excel 365 so as each time the A1 cell - containing a rectangular - is clicked ,  _
    the C1 cell automatically will apear the world  "APPLY"  and when the B1 cell containing a rectangular is clicked the  _
    D1 cell automaticaly will appear the phrase "NOT APPLY". 
    THANK YOU

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Try the following :

    Private Sub Worksheet_BeforeClick(ByVal Target As Range)
    If Not Intersect(Target, Range("A1") Is Nothing Then 
        Range("C1").Value = "Apply"
    End If
    If Not Intersect(Target, Range("B1") Is Nothing Then 
        Range("D1").Value = "Not Apply"
    End If
    End Sub
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Newbie
    Joined
    Sep 2023
    Posts
    4
    Location
    Dear sir, thank you for your reply
    Eventhough each time I click A1 or B1 it goes directly to C1 or D1 , it appears either the "apply" nor the 'not apply" .
    Could you please think of what might doing wrong?

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,059
    Location
    Attach your workbook so we can see where the code is placed.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    VBAX Newbie
    Joined
    Sep 2023
    Posts
    4
    Location
    Quote Originally Posted by Aussiebear View Post
    Attach your workbook so we can see where the code is placed.
    I sent you 5 items with theirs oval (B and C) and links (D and E).
    I wrote and save the code you previosly sent me , but when I tried to assign the macro, I could not locate it in a file.
    Thank you for your help in advance
    Attached Files Attached Files

  6. #6
    is this what you meant
    Attached Files Attached Files

  7. #7
    VBAX Newbie
    Joined
    Sep 2023
    Posts
    4
    Location
    yes , I am gradeful to you.
    Is there a better shape (circle that shows a spike in the middle when someone answers) instead of an oval or a rectangular ?
    but regardless of your answer , I thank you !!

  8. #8
    you can add ActiveX checkbox and add code to it. see Sheet2.
    Attached Files Attached Files

Posting Permissions

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