LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 58
Default Check Box Code

Watch for word wrap:

Private Sub CheckBox1_Click()
With CheckBox1
If .Value = True Then ActiveSheet.Range("A2").Value =
Range("Sheet2!$B$4").Value
If .Value = False Then ActiveSheet.Range("A2").Value = ""
End With
End Sub

or possibly
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
ActiveSheet.Range("A2").Value = Range("Sheet1!$B$4").Value
Else
ActiveSheet.Range("A2") = ""
End If
End Sub

"Bob" wrote in message
...
How do you make if True, Display the value of Sheet2 Cell B4? Below will

not work.

Private Sub CheckBox1_Click()
With CheckBox1
If CheckBox1.Value = True Then ActiveSheet.Range("A2").Value =

"Sheet2!$B$4"
If CheckBox1.Value = False Then ActiveSheet.Range("A2") = ""
End With
End Sub

Thank you





 
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
Check Box - Macro code Vicky Excel Discussion (Misc queries) 2 March 17th 09 08:28 AM
code to check condition for each row Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 February 10th 09 08:07 PM
Please check my code!!!! Tdp Excel Discussion (Misc queries) 1 October 27th 08 02:39 PM
code to hide check boxes Matt Excel Programming 4 January 10th 04 06:31 PM
Check my code to use template? Ed[_9_] Excel Programming 1 July 23rd 03 03:04 AM


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