Thread: Checkboxes
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Checkboxes

because you don't have a With statement with a valid object identified that
has an Offset property.

Perhaps

With ActiveCell
For Each ctrl In Me.Controls
If TypeOf ctrl Is MSForms.CheckBox Then
n = n + 1
If ctrl.Value Then
.Offset(0, n).Value = Chr(82)
End If
End If
Next ctrl
End With



--
Regards,
Tom Ogilvy

"Robbyn" wrote:

Greetings! Why am I getting the "Object doesn't support this property or
method" error on the following code:

For Each ctrl In Me.Controls
If TypeOf ctrl Is MSForms.CheckBox Then
n = n + 1
If ctrl.Value Then
.Offset(0, n).Value = Chr(82) <------Error
End If
End If
Next ctrl

TIA

 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.