#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Checkbox

Hello

I would like to perform the following 2 tasks when someone clicks on the checkbox featu

First is enter the word "Market" in cell G9 and
Secondly to take whatever number appears in cell G16 and have it appear in cell B9, if the check
box is not selected then to leave blank both cells G9 and B9.

I tried the following but it does not work:

Private Sub Checkbox1_Clicks()
If CheckBox1.Value = True Then Range("B9").Value = Range("G16").Value and Range("G9") = "Market"
Else:
Range("B9").Value = ""
Range("G9") = ""
End Sub

Your help would be appreciated

Jen T.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Checkbox

Susan/Jen T.

This is working for me, maybe it does what you want...
'----------------------------------------------------------
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Range("B9").Value = Range("G16").Value
Range("G9") = "Market"
Else
Range("B9").Value = ""
Range("G9") = ""
End If
End Sub
'----------------------------------------------------------

Regards,
Jim Cone
San Francisco, USA


"Susan Hayes" wrote in message ...
Hello

I would like to perform the following 2 tasks when someone clicks on the checkbox featu
First is enter the word "Market" in cell G9 and
Secondly to take whatever number appears in cell G16 and have it appear in cell B9, if the check
box is not selected then to leave blank both cells G9 and B9.
I tried the following but it does not work:


Private Sub Checkbox1_Clicks()
If CheckBox1.Value = True Then Range("B9").Value = _
Range("G16").Value and Range("G9") = "Market"
Else:
Range("B9").Value = ""
Range("G9") = ""
End Sub

Your help would be appreciated

Jen T.


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
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
Checkbox Thomp New Users to Excel 1 February 8th 07 12:19 AM
checkbox? rwijnia Excel Worksheet Functions 4 November 3rd 05 07:40 PM
CheckBox in VBA Stephane[_3_] Excel Programming 2 April 20th 04 09:28 PM
Checkbox cadbury[_2_] Excel Programming 7 November 13th 03 07:36 AM


All times are GMT +1. The time now is 03:42 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"