LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default VBA Beginner: Help with Checkboxes on created User Form

You don't seem to be slow at all. You are pretty much there as far as code
is concerned. Only a couple of points. If you just refer to Range("R2"),
then the value will be changed on the value of "R2" on the active sheet,
whatever that is at the moment. One soultion is to name the cells on the
data sheet to "Asthma" (or whatever), and then refer to the cell by name.
Secondly I presume you want to reset if the check box is deselected. So you
will need to have the elase statement also.

Example:

Private Sub ckbxAsthma_Click()
If ckbxAsthma.Value Then
Range("Asthma") = "Asthma checked"
Else
Range("Asthma") = ""
End If
End Sub

Also you may need to add initializing code.

"MarianneR" wrote
in message ...

Ok, I'm really sorry that I'm so slow. And, I cannot tell you how much
I appreciate all the help.

I decided to go with the checkboxes. I have 9 of them. I've
successfully named them. Unfortunately, this is as far as I've
gotten.

One of my checkboxes is "Asthma." So, I've named it "ckbxAsthma" and
have added this code:

Private Sub ckbxAsthma_Click()
If ckbxAsthma.Value Then Range("R2") = "Asthma checked"

End Sub

I don't know if the R2 is right ~ or if any of it is right for that
matter. YIKES.

So, this is what I want to do: I want to be able to select the
checkbox "Asthma" and have that information jump into column R on
another spreadsheet. The text and list boxes work fine. But, I don't
quite understand how to define my checkbox and then have it dump into
my data sheet.

Again, I'm really sorry that I'm not grasping this.


--
MarianneR
------------------------------------------------------------------------
MarianneR's Profile:
http://www.excelforum.com/member.php...fo&userid=6253
View this thread: http://www.excelforum.com/showthread...hreadid=475191



 
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 clear all checkboxes on a form? Arlen Excel Worksheet Functions 2 May 6th 10 04:20 PM
Copy checkboxes created with Excel97 [email protected] Excel Discussion (Misc queries) 0 April 6th 09 07:39 PM
I created a form on excel. want to edit the form without printing Oz Excel Discussion (Misc queries) 1 September 1st 05 08:18 PM
Beginner - Excel - Auto look up values from worksheet 3 from User duBedat68 Excel Programming 0 December 20th 04 04:47 AM
Beginner question: where to put code when form loads TBA[_2_] Excel Programming 4 August 31st 03 09:28 PM


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