#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 349
Default Macro Boxes

Here is the code that was used to create the color cell macro:

Sub auditt()
Dim sh1 As Worksheet, sh2 As Worksheet
Set sh1 = Sheets("12 Original")
Set sh2 = Sheets("12 Final")
For Each r In sh1.UsedRange
v1 = r.Value
rr = r.Row
cc = r.Column
v2 = sh2.Cells(rr, cc).Value
If v1 < v2 Then
sh2.Cells(rr, cc).Interior.ColorIndex = 36
End If
Next

End Sub

It would be great if we could toggle this to make it turn on/off by pressing
the button.

Thanks.

"Gord Dibben" wrote:

Peter

Do you want a toggle on/off macro?

Sample.................

Sub Wrap_Text()
With Selection
.WrapText = Not .WrapText
End With
End Sub

Click once to set wrap text on. Click again to turn off.

I think you posted earlier and got code to color some cells.

Post that code and we'll have a look at toggling.


Gord Dibben MS Excel MVP

On Wed, 3 Oct 2007 16:01:00 -0700, Peter
wrote:

Hello, I created a box and inserted a macro. Now I can click on the box to
run the macro but it won't turn off when I click it again. How can I "Un-run"
the macro by clicking on the box a second time?

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
Macro Boxes Peter Excel Discussion (Misc queries) 4 October 5th 07 12:34 AM
Macro that can run combo boxes simonsmith Excel Discussion (Misc queries) 0 June 5th 06 05:00 PM
How do I get the macro tool boxes to display? Pat New Users to Excel 3 January 19th 06 04:24 AM
How clear the cut/copy blinking boxes after macro John Excel Worksheet Functions 2 January 13th 06 11:37 PM
How do I create a macro to return drop down boxes to first item i. gaalseth Excel Discussion (Misc queries) 1 April 13th 05 09:09 PM


All times are GMT +1. The time now is 02:17 PM.

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"