Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Triggering macro
I am looking for a one time use macro which will select and then deselect
each cell in the range G7:P300. I need this to trigger a worksheet change macro in each of the cells. I can do this manually by selecting the cell then clicking in the formula bar then selecting the next cell. But that is close to 3000 cells and would be very time consuming. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Triggering macro
On Jan 19, 1:20 am, "Patrick C. Simonds"
wrote: I am looking for a one time use macro which will select and then deselect each cell in the range G7:P300. I need this to trigger a worksheet change macro in each of the cells. I can do this manually by selecting the cell then clicking in the formula bar then selecting the next cell. But that is close to 3000 cells and would be very time consuming. You want to loop through the range of cells using the For Each Next Construct. Like this: Sub ChangeCells() Dim cRange as Range, cell as Range Set cRange = Range("G7:P300") For Each cell in cRange cell change code here Next End Sub That's it. SteveM |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Triggering macro
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA newbie needs help with triggering a macro | Excel Programming | |||
Triggering a macro after Printing | Excel Programming | |||
Triggering a macro after Printing | Excel Programming | |||
Function triggering a macro | Excel Worksheet Functions | |||
Daily Macro Triggering | Excel Discussion (Misc queries) |