Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default 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
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
VBA newbie needs help with triggering a macro mav93[_3_] Excel Programming 3 February 24th 06 06:09 PM
Triggering a macro after Printing Sloth Excel Programming 5 February 7th 06 05:34 PM
Triggering a macro after Printing Jim Thomlinson[_5_] Excel Programming 0 February 6th 06 09:33 PM
Function triggering a macro Leon Excel Worksheet Functions 1 December 22nd 05 07:26 AM
Daily Macro Triggering JB2010 Excel Discussion (Misc queries) 2 November 2nd 05 04:28 PM


All times are GMT +1. The time now is 09:31 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"