[AccessD] Automation Error 91 for Excel Checkbox

Bill Benson bensonforums at gmail.com
Wed Jun 25 02:04:51 CDT 2014


> Sorry I missed that you are using the .Select method. My With Statement
is applying to Cel but should be to a control.
>
> Dim a variable Ctl as object.
>
> Remove .select as follows
>
> Set Ctl = xlWB.ActiveSheet.CheckBoxes.Add(Left:=cel.Left, Top:=cel.Top,
Width:=cel.Width, Height:=cel.Height)
> With Ctl
>  .Caption = ""
>
> .Value = cel.Offset(0, -5)
> .LinkedCell = cel.Offset(0, -5).Address
> .Locked = False
> End With
> Next
> xlWB.Close
>


More information about the AccessD mailing list