Making column C repeat in final printout

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet that goes from column A to HK. I have code written that
prints out a specific cell range based upon a drop down list choice. Since
the information in Column C is the same all across the spreadsheet, I have
frozen the sheet to scroll across.

I want the range of C3:c92 to be included on the printout page, regardless
of which choice is made in the dropdown list. Here is a short example of the
code:

Private Sub Commandbutton1_Click()
With ActiveSheet
Select Case UCase(.Range("c1").Value)
Case Is = "1"
.Range("c3:h92").PrintOut preview:=True
Case Is = "2"
.Range("j3:o92").PrintOut preview:=True
Case Is = "3"
.Range("q3:w92").PrintOut preview:=True

............and so on. What addtional code do I need to make C3:C92 appear
on the left hand side of the page printout?
 
You could try page setup and columns to repeat on the last tab - or

Private Sub Commandbutton1_Click()
With ActiveSheet
.columns.Hidden = False
Select Case UCase(.Range("c1").Value)
Case Is = "1"
.Range("c3:h92").PrintOut preview:=True
Case Is = "2"
.Range("D:I").entireColumn.Hidden = True
.Range("C3:o92").PrintOut preview:=True
Case Is = "3"
.Range("D:P").Entirecolumn.Hidden = True
.Range("C3:w92").PrintOut preview:=True
end select
.columns.Hidden = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top