ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Leftover formatting in code (https://www.excelbanter.com/excel-programming/362482-leftover-formatting-code.html)

Clark

Leftover formatting in code
 
I have this code:
Private Sub Commandbutton1_Click()
With ActiveSheet
Select Case UCase(.Range("c1").Value)
Case Is = "1"
.Range("c2:h92").PrintOut preview:=True
Case Is = "2"
.Range("j2:o92").PrintOut preview:=True

End Select
End With

End Sub

It works fine, but it shrinks the resulting printout donw to one page. I
originally wanted to do this, entered the code, then changed my mind and
deleted it. However, it keeps forcing this to print on only one page.....and
too small to read.


bgeier[_14_]

Leftover formatting in code
 

In Print Preview check your settings to see if the "Page" settings are
set correctly.
It sounds like you changed your mind after you ran the macro, changed
the macro, but did not change the Page settings.


--
bgeier
------------------------------------------------------------------------
bgeier's Profile: http://www.excelforum.com/member.php...o&userid=12822
View this thread: http://www.excelforum.com/showthread...hreadid=545704


Clark

Leftover formatting in code
 
Outstanding! I was so focused on the code issue, I forgot to look in the most
obvious place..............so much for exhausted brain power.....

"bgeier" wrote:


In Print Preview check your settings to see if the "Page" settings are
set correctly.
It sounds like you changed your mind after you ran the macro, changed
the macro, but did not change the Page settings.


--
bgeier
------------------------------------------------------------------------
bgeier's Profile: http://www.excelforum.com/member.php...o&userid=12822
View this thread: http://www.excelforum.com/showthread...hreadid=545704



bgeier[_15_]

Leftover formatting in code
 

I know that feeling TOO well!!!

Sometimes one sees the forest but not the trees, so why does no put a
sign on the trees?


--
bgeier
------------------------------------------------------------------------
bgeier's Profile: http://www.excelforum.com/member.php...o&userid=12822
View this thread: http://www.excelforum.com/showthread...hreadid=545704



All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com