Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
PaulJ
 
Posts: n/a
Default Macro to tick checkbox automatically

Hi,
I have a spreadsheet with a macro assigned to a button, with a checkbox
(from the control toolbar) next to this button for the user to manually tick
when they have run the macro. Is there a way for the checkbox to be ticked
automatically when the button is clicked?
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy
 
Posts: n/a
Default Macro to tick checkbox automatically

Just add code in the macro assigned to the button

Activesheet.CheckBox1.Value = true

--
Regards,
Tom Ogilvy


"PaulJ" wrote in message
...
Hi,
I have a spreadsheet with a macro assigned to a button, with a checkbox
(from the control toolbar) next to this button for the user to manually

tick
when they have run the macro. Is there a way for the checkbox to be

ticked
automatically when the button is clicked?
Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.misc
PaulJ
 
Posts: n/a
Default Macro to tick checkbox automatically

Thanks Tom, I've adapted this slightly as my checkboxes aren't necessarily
CheckBox1. I've inserted the following code into my macro and it works
nicely:

With ActiveSheet
.Checkboxes.Value = True
End With

I wondered if anyone knows whether checkboxes can be protected? Ideally I
would like my macro to determine whether the checkbox is ticked or not.

Regards, Paul

"Tom Ogilvy" wrote:

Just add code in the macro assigned to the button

Activesheet.CheckBox1.Value = true

--
Regards,
Tom Ogilvy


"PaulJ" wrote in message
...
Hi,
I have a spreadsheet with a macro assigned to a button, with a checkbox
(from the control toolbar) next to this button for the user to manually

tick
when they have run the macro. Is there a way for the checkbox to be

ticked
automatically when the button is clicked?
Thanks!




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
Checkbox to be marked with a cross rather than a tick Den New Users to Excel 1 February 22nd 06 10:04 AM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Macro for checkbox (2) es Excel Discussion (Misc queries) 0 April 5th 05 01:48 PM
tick a reference automatically Mehdi Excel Discussion (Misc queries) 1 March 15th 05 03:45 PM
Automatically launch a macro when a fil is opened One-Leg Excel Discussion (Misc queries) 1 December 15th 04 08:12 PM


All times are GMT +1. The time now is 12:18 AM.

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"