Print Cell Selection Excel for Mac 365

wherespete

New Member
Joined
Sep 21, 2007
Messages
15
Hello,

Here's a frustrating Excel for Mac 365

I have a very simple macro for printing a selection of cells based on the length of a particular column within the dataset - and yes, I am fairly idiosyncratic in using "Range(Cells(), Cells())" as my syntax.

The range is rarely more than 30 rows long and this is my code:

VBA Code:
Sub PrintList()
    
Application.ScreenUpdating = False

r1 = Cells(20000, 5).End(xlUp).Row

Range(Cells(3, 3), Cells(r1, 6)).Select

Selection.PrintOut From:=1, To:=1, Copies:=1

Cells(1, 1).Select

Application.ScreenUpdating = True

End Sub


As you can see, it calculates the row number of the bottom value in column E and creates a selection from row 3 to that row number. And prints it.

Well, it used to in Excel for Mac 11, but now it refuses to select the range and whizzes the entire worksheet to the printer (which is about 14 pages long) instead of the range that I had tried to select. If I print manually, I have to select "Selection" from the Print drop-down menu in the Print dialogue box pop-up, but if I record that action no clear command record in Visual Basic.

Can anyone explain what command I need to put into my code for Excel Mac 365 to recognise a range to print, please? Clearly it doesn't like Range().Select and Selection.PrintOut... ?

Many thanks,

Pete
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Nobody? Has nobody got any suggestions as to how a print selection line in Excel 2011 doesn't work now in Excel 365?
 
Upvote 0

Forum statistics

Threads
1,214,529
Messages
6,120,070
Members
448,943
Latest member
sharmarick

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