VBA Updae Cell References

Johndinho

Board Regular
Joined
Mar 21, 2013
Messages
85
Hi,

I'm sure this will be a dumb question because I'm sure I already know the answer.

I have written a dozen modules of code in a spreadsheet and now the main sheet used needs to be edited slightly. This means inserting 6 rows to it so all my code references are now out by 6 rows.

I don't really want to edit all the modules - is there a way to update them automatically the way functions do in a cell?

Or is there a way to guard against something like this happening again?

Any advice gratefully received

Thanks,
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,368
Office Version
2019, 2016, 2013
Platform
Windows
planning can reduce the issue, and relative referencing to static keywords might help other wise step through line by line and fix it :(
 

Watch MrExcel Video

Forum statistics

Threads
1,102,714
Messages
5,488,471
Members
407,639
Latest member
Carlos Ottoni

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top