PDA

View Full Version : A1 RECTANGULAR B1 APPLY



banal
09-24-2023, 11:56 PM
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

Aussiebear
09-25-2023, 05:02 AM
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

banal
09-26-2023, 12:50 AM
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?

Aussiebear
09-26-2023, 12:57 AM
Attach your workbook so we can see where the code is placed.

banal
09-26-2023, 07:13 AM
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

arnelgp
09-26-2023, 09:43 PM
is this what you meant

banal
09-27-2023, 02:29 AM
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 !!

arnelgp
09-27-2023, 03:27 AM
you can add ActiveX checkbox and add code to it. see Sheet2.