How to copy, edit then paste a macro.

R

Romileyrunner1

Hi,
I have a worksheet which needs lots of macros.
All the macros are very similar.
They need to turn off the protection, highlight the full spreadsheet (which
is very big and not easy to do accurately first time), sort on a particular
collumn, then turn back on the protection.
The only real difference is the collumn to be sorted on and then the
finishing range of cells in view (I want it to be central in view to the
collumn that has just been sorted: not right back on the far left so you have
to scroll back again).

So, having recorded 1 macro, how can I copy, edit and paste this and rename
to become the next one I need etc. (these are all going to be activated by
buttons on top of each relavent collumn).

Many thanks.
RR1
 
P

Pete_UK

Can't you just have one macro into which you pass a parameter which is
the column to be sorted? Presumably you want to show that column in
the centre of the screen, so that the scrolling you do after sorting
is also dependent on the column number.

Post your macro here and I'm sure someone will be able to help
further.

Hope this helps.

Pete
 

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

Top