Copying VBA code from one worksheet to another

Rab_marr

New Member
Joined
Apr 12, 2016
Messages
24
Good afternoon everyone,

I have an issue I am unable to resolve without your help. I have 2 different code allocated to one sheet,
  • one autofilters based on the contents of a cell (Register)
  • and the other tracks the changes made within the sheet and records it on another sheet (Log)

My problem is when I run the first code it takes a long time to complete when the second code is present.

What I have tried to do is cut and paste the second code into an empty sheet (Temp).

What I am hoping to achieve is that I can record a macro that will:
  • open (Register)
  • Run the autofilter code
  • copy the tracking code within the (temp) sheet
  • Paste the tracking code into (register)

Then a second macro that will:
  • Unhide the filtered rows
  • Delete the tracking code from (register)
  • Clear the contents from Column N

The majority of the above is relatively easy, however I cannot work out how to include the steps in bold above into a recorded marco.

I would appreciate any suggestions from the site Gurus.

Many thanks

Rab
 
Last edited:

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top