Macro Print Buttons Disappear after single use

Scottc71

New Member
Joined
May 17, 2010
Messages
9
Hi,

I have a Spreadsheet .xlsm and when I use the Print Button on the sheet it disappears, I have pasted the macro below for analysis

it also only prints the row that has an active cell

Sub PrintLabour()
'
' Print Refurb Macro
' Macro recorded 19/07/2010 by DMG Communications
'
Application.ScreenUpdating = False
Range("d8").Select
Do Until ActiveCell = "end"
If ActiveCell = 0 Then
ActiveCell.Offset(0, 0).Rows("1:1").EntireRow.Select
Selection.EntireRow.Hidden = True
ActiveCell.Offset(1, 3).Select
End If
If ActiveCell > 0 Then
ActiveCell.Offset(1, 0).Select
End If
Loop
ActiveSheet.PageSetup.PrintArea = "$A$1:$i$49"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.PageSetup.PrintArea = "$A$1:$i$49"
Rows("8:49").Select
Selection.EntireRow.Hidden = False
Application.ScreenUpdating = True
Range("i49").Select
End Sub

hope i can get some help on this, it has only started making the button disappear when I upgraded to 2010

Cheers

Scott
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
I have tested the sheet on Office 2007 and the button remains, so it is only on the latest version on Excel that it disappears

cheers

Scott
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,716
Members
452,939
Latest member
WCrawford

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