Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
vtj vtj is offline
external usenet poster
 
Posts: 9
Default test value of yes/no box

I'm new to Excel programing - have some Access programming. I have a column
that has yes/no boxes in Excel. Is there a way to test the entry to see if
it is yes or no? I'm thinking about a VBA If statement. I would select the
row and column to be checked and then use the If statement to determine one
of two actions to be done. I have tried using the .value with True, False,
Y, T, 0, -1, F, and N for the .value being equal to but none of them work.
Maybe .value is not the proper value to test? In Access you can test for
true or false. There is obviously something that I am totally missing. Any
pointers gladly accepted.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default test value of yes/no box

Can you define Yes/No box. Are you using check boxes, option buttons, drop
down combo boxes or data validaton lists? If it is anything other than the
data validation list did you get the object from the Forms Toolbar of the
Control Toolbox?
--
HTH...

Jim Thomlinson


"vtj" wrote:

I'm new to Excel programing - have some Access programming. I have a column
that has yes/no boxes in Excel. Is there a way to test the entry to see if
it is yes or no? I'm thinking about a VBA If statement. I would select the
row and column to be checked and then use the If statement to determine one
of two actions to be done. I have tried using the .value with True, False,
Y, T, 0, -1, F, and N for the .value being equal to but none of them work.
Maybe .value is not the proper value to test? In Access you can test for
true or false. There is obviously something that I am totally missing. Any
pointers gladly accepted.

  #3   Report Post  
Posted to microsoft.public.excel.programming
vtj vtj is offline
external usenet poster
 
Posts: 9
Default test value of yes/no box

It is check box form control from the insert tab. I am trying to test the
value or condition of the box.

"Jim Thomlinson" wrote:

Can you define Yes/No box. Are you using check boxes, option buttons, drop
down combo boxes or data validaton lists? If it is anything other than the
data validation list did you get the object from the Forms Toolbar of the
Control Toolbox?
--
HTH...

Jim Thomlinson


"vtj" wrote:

I'm new to Excel programing - have some Access programming. I have a column
that has yes/no boxes in Excel. Is there a way to test the entry to see if
it is yes or no? I'm thinking about a VBA If statement. I would select the
row and column to be checked and then use the If statement to determine one
of two actions to be done. I have tried using the .value with True, False,
Y, T, 0, -1, F, and N for the .value being equal to but none of them work.
Maybe .value is not the proper value to test? In Access you can test for
true or false. There is obviously something that I am totally missing. Any
pointers gladly accepted.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default test value of yes/no box

For a checkbox from the Control Tool Box:

Sub TF()
MsgBox ActiveSheet.Checkbox1.Value 'Reurns True/False
End Sub

For a checkbox from the Forms tool bar:
'This returns numerical values of -4126 for False and 1 for True
Sub Vlu()
MsgBox ActiveSheet.DrawingObjects("Check Box 1").Value
End Sub







"vtj" wrote:

It is check box form control from the insert tab. I am trying to test the
value or condition of the box.

"Jim Thomlinson" wrote:

Can you define Yes/No box. Are you using check boxes, option buttons, drop
down combo boxes or data validaton lists? If it is anything other than the
data validation list did you get the object from the Forms Toolbar of the
Control Toolbox?
--
HTH...

Jim Thomlinson


"vtj" wrote:

I'm new to Excel programing - have some Access programming. I have a column
that has yes/no boxes in Excel. Is there a way to test the entry to see if
it is yes or no? I'm thinking about a VBA If statement. I would select the
row and column to be checked and then use the If statement to determine one
of two actions to be done. I have tried using the .value with True, False,
Y, T, 0, -1, F, and N for the .value being equal to but none of them work.
Maybe .value is not the proper value to test? In Access you can test for
true or false. There is obviously something that I am totally missing. Any
pointers gladly accepted.

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
Can you help test our Excel test? Jeff[_14_] Excel Discussion (Misc queries) 1 December 7th 09 05:11 PM
Calculate mean of test scores from rows of test answers RiotLoadTime Excel Discussion (Misc queries) 1 July 26th 06 05:14 PM
Test test Excel Discussion (Misc queries) 0 April 5th 06 07:58 AM
test..where are my messages..test HT New Users to Excel 0 January 23rd 05 06:23 PM
test John Proud Excel Programming 0 December 31st 03 09:44 AM


All times are GMT +1. The time now is 01:15 AM.

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

About Us

"It's about Microsoft Excel"