Changing of Macros

  • Thread starter Thread starter Naas
  • Start date Start date
N

Naas

How do I get Excel to automatically change/update macros
after I've added rows and/or columns in a spreadsheet
 
You don't, you cater for the variable length to begin with. For example,
this code

cRows = Cells(Rows.Count,"A").End(xlUp).Row

will return the number of rows that are used in column A, regardless of
whether new ones have just been added.

If you want more help, post back with more details of what you want to do.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
will return the number of rows that are used in column A

Bob, I would have defined (to the OP) cRows as returning the last non-empty
row number in Column A. Am I being persnickety? <<vbg>>
Jim
 
Hi Ron,

This is one.

Hopes it is enough.

Regards,

Naas



Sub adddelivery()
'
' adddelivery Macro
' Macro recorded 2003/04/30 by Naas Vermaak
'

'
ActiveSheet.Unprotect
Sheets("FIXED INPUTS").Select
Range("A49:J49").Select
Selection.Copy
Sheets("DELIVERIES").Select
Range("B27").Select
Selection.insert Shift:=xlDown
Range("B46:K46").Select
Selection.Delete Shift:=xlUp
Range("C27").Select

End Sub





-----Original Message-----
Hi Naas

Post a example of your macro.
We can help you then


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Naas" <[email protected]> wrote in
message news:[email protected]...
 
Jim,

No, you are being accurate. The number can be derived from it, but per se it
is not that number.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top