LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I have a programing problem!


I have built a macro using the recording function. The programing was
intended to have cell B20 equal to cell B197. Here is the program

Sub AZWage()
'
' AZWage Macro
' Macro recorded 8/19/2005 by Systems Administrator
'

'
Range("G9:G13").Select
Selection.Interior.ColorIndex = xlNone
Range("G12").Select
With Selection.Interior
..ColorIndex = 41
..Pattern = xlSolid
End With
Range("B20").Select
ActiveCell.FormulaR1C1 = "=R[177]C"
Range("B21").Select
ActiveCell.FormulaR1C1 = "=R[178]C"
Range("B23").Select
ActiveCell.FormulaR1C1 = "=R[173]C"
Range("B24").Select
ActiveCell.FormulaR1C1 = "=R[174]C"
Range("B26").Select
ActiveCell.FormulaR1C1 = "=R[169]C"
Range("B27").Select
ActiveCell.FormulaR1C1 = "=R[167]C"
Range("B28").Select
Range("C20").Select
ActiveCell.FormulaR1C1 = "=R[177]C"
Range("C21").Select
ActiveCell.FormulaR1C1 = "=R[178]C"
Range("C23").Select
ActiveCell.FormulaR1C1 = "=R[173]C"
Range("C24").Select
ActiveCell.FormulaR1C1 = "=R[174]C"
Range("C26").Select
ActiveCell.FormulaR1C1 = "=R[169]C"
Range("C27").Select
ActiveCell.FormulaR1C1 = "=R[167]C"
Range("C28").Select
ActiveWindow.ScrollRow = 1
End Sub

The problem with the prgram is that if you insert cells above B20 or
between B20 and B197 then everything gets goofed up. What can I do
differently so that if the worksheet is modified it doesn't effect the
macro.

Thanks for the help. I need it as soon as possible. I am trying to help
the big boss out with this.


--
mgmcdevitt
------------------------------------------------------------------------
mgmcdevitt's Profile: http://www.excelforum.com/member.php...o&userid=26592
View this thread: http://www.excelforum.com/showthread...hreadid=398682

 
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
Proper Programing Tim Excel Programming 1 November 19th 04 03:17 PM
VB programing Mestrella31 Excel Programming 3 October 11th 04 03:05 PM
Programing buttons Mike Excel Programming 1 July 28th 04 06:44 PM
Help with VBA programing CyberStorm Excel Programming 3 July 26th 04 07:57 PM
programing book Matt Excel Programming 1 August 1st 03 08:21 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"