Print and add count

MarkDShark

Board Regular
Joined
Jun 10, 2008
Messages
228
I have a clear button that i use that adds 1 to a cell that i have that counts input sheets as they are filled and cleared, 1,2,3 and so on. Piece of code below to give you an idea, I know its incomeplete, but just wanted to show you it. Anyway, i wanted to be able to do the same thing with a Print button, but not sure how to do it. Hope you can help, thanks.

Dim x As Integer<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
x = Range("V9").Value<o:p></o:p>
Range("V6").Select<o:p></o:p>
Selection.ClearContents<o:p></o:p>
Range("V8:V14").Select<o:p></o:p>
ActiveWindow.SmallScroll Down:=-51<o:p></o:p>
Range("V6").Select<o:p></o:p>
Selection.ClearContents<o:p></o:p>
x = x + 1<o:p></o:p>
Range("V9").Value = x<o:p></o:p>
Range("V9").Select<o:p></o:p>
Range("V6").Select<o:p></o:p>
Selection.ClearContents<o:p></o:p>
End Sub
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,224,566
Messages
6,179,555
Members
452,928
Latest member
101blockchains

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