ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA Execel Macro & Check Box help (https://www.excelbanter.com/excel-programming/294964-vba-execel-macro-check-box-help.html)

Aversin

VBA Execel Macro & Check Box help
 
I recorded a macro that copys one cell and pastes it to another cell o
another sheet. Then I assigned it to a check box. It works just fine
but what I would like is:
How do I stop the macro from running if I uncheck the box

--
Message posted from http://www.ExcelForum.com


pikus

VBA Execel Macro & Check Box help
 
Please post the code you used. - Piku

--
Message posted from http://www.ExcelForum.com


Aversin[_2_]

VBA Execel Macro & Check Box help
 
Sub flip1()
'
' flip1 Macro
' Macro recorded 4/13/2004 by
'

'
Sheets("Comments").Select
Range("B2:M3").Select
End Sub

This code is for check box 10.
I'm new to all of this so please bare with me

--
Message posted from http://www.ExcelForum.com


pikus

VBA Execel Macro & Check Box help
 
Well, that's the Subroutine that's being called, but where is it bein
called from? If it's in the checkbox itself you could alter that lik
this:

If CheckBox10.Value = True Then
flip1()
End If

To do what you want you need to use the IF statement, but where to pu
it exactly is the only question. - Piku

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com