mira este codigo pero quiero que cuando vuelva a selecciona un shape especifico en su celda que este codigo ya esta basado que el mouse detecta en donde esta para cambiar el estado de ese shape mientras ewl mouse esta en esa celda: using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Windows.Threading;
using Excel = Microsoft.Office.Interop.Excel;
using Office = Microsoft.Office.Core;

namespace CheckboxManagerAddin
{
    public partial class ThisAddIn
    {
        private DispatcherTimer _mouseTimer;
        private bool _wasLeftButtonDown = false;

        [DllImport("user32.dll")]
        private static extern IntPtr SetThreadDpiAwarenessContext(IntPtr dpiContext);
        private static readonly IntPtr DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = new IntPtr(-4);

        [DllImport("user32.dll")]
        private static extern short GetAsyncKeyState(int vKey);
        private const int VK_LBUTTON = 0x01;

        private void ThisAddIn_Startup(object sender, EventArgs e)
        {
            _mouseTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(10) };
            _mouseTimer.Tick += MouseTimer_Tick;
            _mouseTimer.Start();
        }

        private void MouseTimer_Tick(object sender, EventArgs e)
        {
            using (new DpiContextBlock(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2))
            {
                try
                {
                    var app = this.Application;
                    var ws = app.ActiveSheet as Excel.Worksheet;
                    if (ws == null)
                        return;

                    // Obtenemos la posición actual del cursor (aunque no se usa en esta versión,
                    // se deja por si se requiere en ajustes futuros)
                    POINT pt;
                    if (!GetCursorPos(out pt))
                        return;

                    var win = app.ActiveWindow;
                    if (win == null)
                        return;

                    bool isLeftButtonDown = (GetAsyncKeyState(VK_LBUTTON) & 0x8000) != 0;

                    // Al detectar la transición de botón no presionado a presionado...
                    if (isLeftButtonDown && !_wasLeftButtonDown)
                    {
                        Excel.Range cell = app.ActiveCell as Excel.Range;
                        if (cell != null)
                        {
                            ToggleShapeColor(ws, cell);
                        }
                    }

                    _wasLeftButtonDown = isLeftButtonDown;
                    UpdateAllShapesPosition(ws);
                }
                catch (COMException ex)
                {
                    // El error 0x800AC472 se ignora, ya que es común en Excel interop
                    if ((uint)ex.ErrorCode != 0x800AC472)
                        System.Diagnostics.Debug.WriteLine("COMException: " + ex.Message);
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine("Error: " + ex.Message);
                }
            }
        }

        /// <summary>
        /// Alterna el color del shape asociado a la celda (no crea shapes).
        /// Se calcula el nombre del shape a partir de la dirección de la celda.
        /// </summary>
        private void ToggleShapeColor(Excel.Worksheet ws, Excel.Range cell)
        {
            try
            {
                string shapeName = $"Shape_{cell.Address[false, false].Replace("$", "")}";
                foreach (Excel.Shape shape in ws.Shapes)
                {
                    if (shape.Name.Equals(shapeName, StringComparison.OrdinalIgnoreCase))
                    {
                        int currentColor = (int)shape.Fill.ForeColor.RGB;
                        int grayColor = ColorTranslator.ToOle(Color.Gray);
                        int blackColor = ColorTranslator.ToOle(Color.Black);

                        // Se alterna el color: si es gris, pasa a negro, de lo contrario vuelve a gris.
                        shape.Fill.ForeColor.RGB = (currentColor == grayColor) ? blackColor : grayColor;
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Error ToggleShapeColor: " + ex.Message);
            }
        }

        /// <summary>
        /// Actualiza la posición y dimensiones de todos los shapes asociados a celdas.
        /// Se recorre cada shape cuyo nombre comienza con "Shape_" y se asigna la posición y
        /// el tamaño del rango correspondiente.
        /// </summary>
        private void UpdateAllShapesPosition(Excel.Worksheet ws)
        {
            try
            {
                foreach (Excel.Shape shape in ws.Shapes)
                {
                    if (shape.Name.StartsWith("Shape_", StringComparison.OrdinalIgnoreCase))
                    {
                        string cellRef = shape.Name.Replace("Shape_", "");
                        Excel.Range cell = ws.Range[cellRef];
                        if (cell != null)
                        {
                            shape.Left = (float)cell.Left;
                            shape.Top = (float)cell.Top;
                            shape.Width = (float)cell.Width;
                            shape.Height = (float)cell.Height;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine("Error UpdateAllShapesPosition: " + ex.Message);
            }
        }

        private void ThisAddIn_Shutdown(object sender, EventArgs e)
        {
            _mouseTimer?.Stop();
        }

        #region DPI y Win32

        [StructLayout(LayoutKind.Sequential)]
        private struct POINT { public int X, Y; }

        [DllImport("user32.dll")]
        private static extern bool GetCursorPos(out POINT lpPoint);

        [DllImport("user32.dll")]
        private static extern IntPtr MonitorFromWindow(IntPtr hwnd, uint dwFlags);

        [DllImport("Shcore.dll")]
        private static extern int GetDpiForMonitor(IntPtr hmonitor, int dpiType, out uint dpiX, out uint dpiY);

        private const int MDT_EFFECTIVE_DPI = 0;
        private const uint MONITOR_DEFAULTTONEAREST = 2;

        private float GetDpiForWindow(IntPtr hwnd)
        {
            try
            {
                IntPtr hMonitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST);
                if (GetDpiForMonitor(hMonitor, MDT_EFFECTIVE_DPI, out uint dpiX, out uint _) == 0)
                    return dpiX;
            }
            catch { }
            return 96f;
        }

        private class DpiContextBlock : IDisposable
        {
            private IntPtr _oldContext;
            public DpiContextBlock(IntPtr context)
            {
                _oldContext = SetThreadDpiAwarenessContext(context);
            }
            public void Dispose()
            {
                SetThreadDpiAwarenessContext(_oldContext);
            }
        }

        #endregion

        private void InternalStartup()
        {
            this.Startup += new EventHandler(ThisAddIn_Startup);
            this.Shutdown += new EventHandler(ThisAddIn_Shutdown);
        }
    }
}