Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2012, 02:24 AM
stephen_ stephen_ is offline Macro to calculate a value of a checkbox. Windows XP Macro to calculate a value of a checkbox. Office 2010 32bit
Novice
Macro to calculate a value of a checkbox.
 
Join Date: Jun 2012
Posts: 6
stephen_ is on a distinguished road
Default Macro to calculate a value of a checkbox.

Hi,

I'm trying to develop a word form that records details of an organisation. One question is 'What type of organisation are you?'

The options are;



Communtiy
Voluntary
etc etc - for each org type I have a checkbox. I want the checkbox's to all have different values, so if Community was checked it would = 1, voluntary = 2.

The reason for this is that I'm transferring the data from the form into excel to further put into a mysql DB.

Many thanks for any help!

PS Is there a way to add this macro into forms that already have data!

My initial research has found this;

Quote:
Private Sub Checkbox1_Click()
> If Sheet1.CheckBox1.Value Then
> 'Do Stuff
> Else
> 'Undo Stuff
> End If
> End Sub

Would like to have 1 macro though not one for each checkbox.

Last edited by stephen_; 06-27-2012 at 02:40 AM. Reason: Additional info...
Reply With Quote
  #2  
Old 06-27-2012, 04:57 PM
macropod's Avatar
macropod macropod is offline Macro to calculate a value of a checkbox. Windows 7 64bit Macro to calculate a value of a checkbox. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Why don't you use a dropdown?

PS: As your question relates to Excel, I'm moving this thread to the Excel programming area.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
macro vba word



Similar Threads
Thread Thread Starter Forum Replies Last Post
Toggling Checkbox Color Phil H Word VBA 0 06-18-2010 10:51 AM
macro on checkbox macrohelp Word VBA 0 03-06-2009 03:33 PM
Use Form Checkbox to Add Table laxonator Word Tables 0 10-23-2008 06:21 AM
resizing a checkbox?? aceensor Excel 0 05-10-2006 01:44 PM
VBA In Word Checkbox problem andrez Word VBA 0 04-09-2006 02:02 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:39 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft