Copy paste values in intervals with stop function

ziggyfo

New Member
Joined
Mar 24, 2021
Messages
24
Office Version
  1. 2019
Platform
  1. Windows
  2. MacOS
Hi All,

I have the below code that I'm looking to update with some functions, but my VBA knowledge is not anything to talk about
smile.gif


VBA Code:
Sub Odds()

RunTimer = Now + TimeValue ("00:00:05)

Application.OnTime RunTimer "Odds"
       With Sheets ("Sheet1")
             .Range ("A3").Copy Destination:=Range("H" & Rw.Count) .End(xlUp.Offset(1)
        End With
End Sub



What i would like to update this with is for the code to include a function to stop running the macro(I hhave this called in the main worksheet to run as soon as the workbook opens. Ideally i want to link up the additional macro that stops the code to a button on the sheet.

Additionally, currently its only doing a normal copy and paste, however I want it to copy and paste values only, but with a time stamp taken from cell M1 (I have an event timer in cell M1). Copy value from "A3" and time value in M1 and paste both next to each other in Col "H".

Hope I explained this correctly.

Any assistance would be greatly appreciated.
 

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.

Forum statistics

Threads
1,141,001
Messages
5,703,656
Members
421,309
Latest member
ray crad

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
Top