Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Checkbox problem

Not sure why the following code returns an Object Required Error:

If CheckBox1.Value = True Then
rng(1, 6) = "Exempt"
End If

What I want to have happen is for the word Exempt to be placed in the rng(1,
6) when there is a check in Checkbox1


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Checkbox problem

Hi Patrick,

If the checkbox is from the Contol Toolbox,

Try:

If ActiveSheet.OLEObjects("CheckBox1").Object.Value = True Then
Cells(1, 6).Value = "Exempt"
'Or, if rng has been set to a range:
rng(1, 6).Value = "Exempt"
End If


If the checkbox is from the Forms Toolbar, try something like:

If ActiveSheet.CheckBoxes("Check Box 2").Value = xlOn Then
Cells(1, 6).Value = "Exempt"
'Or, if rng has been set to a range:
rng(1, 6).Value = "Exempt"
End If

---
Regards,
Norman



"Patrick Simonds" wrote in message
...
Not sure why the following code returns an Object Required Error:

If CheckBox1.Value = True Then
rng(1, 6) = "Exempt"
End If

What I want to have happen is for the word Exempt to be placed in the
rng(1,
6) when there is a check in Checkbox1



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with checkbox control Giselle Excel Worksheet Functions 1 March 31st 06 12:57 PM
Checkbox problem Patrick Simonds Excel Programming 1 September 29th 05 08:47 AM
Help: weild checkbox problem huangx06 Excel Programming 0 July 7th 05 11:13 PM
Problem copying checkbox values Marty Excel Programming 0 October 3rd 04 05:36 AM
Problem in adding item to a checkbox Shilps Excel Programming 3 April 17th 04 11:56 AM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"