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
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