Ticking Check Boxes

azizrasul

Well-known Member
Joined
Jul 7, 2003
Messages
1,304
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I have an MS Access database where I am trying to place a tick in a check box if the Yes\No value in a recordset value is True. Here's a snippet of the code: -

Code:
    With objExcelApp
            If rst!sessioncompleted = True Then
                .Range("H9").Select
                .ActiveSheet("Check Box 1").Value = True
            End If
    End With
I get the run time error 438 i.e. Object doesn't support this property or method on the .ActiveSheet line. Any ideas anyone?
 
Last edited:

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I have to assume that it is an Excel workbook you are trying to tick a checkmark on the active worksheet according to Access recordset field value from the Access module. Again, I have to assume that it is "check box form control", not Visual Basic Checkbox Control (I guess from the checkbox name). Please ignore the comment below if I am wrong.

It should be like following I guess:

.Activesheet.Shapes("Check Box 1").OLEFormat.Object.Value = True
 
Upvote 0
I'm writing the code from Access. I tried

If rst!sessioncompleted = True Then
.Range("H" & x).Select
.Range("H" & x).Value = True
End If

and it worked. I hadn't realised that I had linked the cell to the check boxes.
 
Upvote 0

Forum statistics

Threads
1,215,446
Messages
6,124,897
Members
449,194
Latest member
JayEggleton

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top