Print count

MarkDShark

Board Regular
Joined
Jun 10, 2008
Messages
228
I have a print button set, but what i want it to do is when i press print, it will automatically add 1 to a cell to keep count of the prints. So say i already made 2 prints, a cell would show 2. When i print again, 1 is added to that cell to make a total of 3. Can a code be added to the print button code to achieve this? I have done this with a clear button, but that code i used doesn't seem to work with the print button. Hope you can help. Thanks!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I have a print button set, but what i want it to do is when i press print, it will automatically add 1 to a cell to keep count of the prints. So say i already made 2 prints, a cell would show 2. When i print again, 1 is added to that cell to make a total of 3. Can a code be added to the print button code to achieve this? I have done this with a clear button, but that code i used doesn't seem to work with the print button. Hope you can help. Thanks!


under the coding for the button itself

Code:
dim asd as integer
 
asd = thisworkbook.sheets("Sheet1").range("A1").value
 
asd = asd + 1
 
thisworkbook.sheets("Sheet1").range("A1").value = asd

once again this goes under the print button code and just change the sheet and cell to be whereever you are wanting the info.
 
Upvote 0

Forum statistics

Threads
1,224,543
Messages
6,179,427
Members
452,914
Latest member
echoix

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