Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide individual/range cells and temporarily increase scale for printing


Hi all,

Very new to VB and macros in excel. First what i'm working on. This is
a basic macro in an invoice that will print 3 pages - two customer copy
and a driver copy.

i would like to have two different headings at the top printed in a
cell - i.e "customer copy" and "Delivery Note".

Either i can have the two headings written in two cells as headers. One
hidden and then printed then hide this and display and print with the
other cell heading.

Or i can have one cell which can have a custom headings printed and
just changes after each print.

I think the second method would be more efficient but i'd also like to
know how to hide a cell.

Remember i'm very much a newb to this sort of thing so please go easy
on me...

Below i include the basics of what i'm using already:

Sub HideAndPrint()
Application.ScreenUpdating = False
Columns("B").Hidden = True
ActiveSheet.PrintOut Copies:=2
Columns("B").Hidden = False
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Columns("B").Hidden = True
ActiveSheet.PrintOut Copies:=1
Columns("B").Hidden = False
End Sub

I've deleted a few lines to keep in shorter but the basic principle is
there.

Thanks for any help!


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387600

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide individual/range cells and temporarily increase scale for printing


I also to forgot to mention that when the previous macro is run, hiding
the columns obviously makes what is displayed on the page less than the
previous version.

As one copy is for a driver and loader, i'd like to increase the scale
of the page so that he/she can more easily read the order.


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387600

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Hide individual/range cells and temporarily increase scale forprinting

You could also do the equivalent of File|page setup|Header/footer tab and change
the header, print, change the header, and print again...

But if you want to change cells:

Sub HideAndPrint()

Application.ScreenUpdating = False

Columns("B").Hidden = True
range("a1").value = "Customer Copy"
ActiveSheet.PrintOut Copies:=2

Columns("B").Hidden = False 'which one here???
Columns("B").Hidden = True
range("a1").value = "Driver Copy"
ActiveSheet.PrintOut Copies:=1

Columns("B").Hidden = False
range("a1").value = "" 'or whatever you want.

Application.ScreenUpdating = True

End Sub



chris100 wrote:

I also to forgot to mention that when the previous macro is run, hiding
the columns obviously makes what is displayed on the page less than the
previous version.

As one copy is for a driver and loader, i'd like to increase the scale
of the page so that he/she can more easily read the order.

--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387600


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Hide individual/range cells and temporarily increase scale for printing


Thanks Dave - works great

--
chris10
-----------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...fo&userid=2516
View this thread: http://www.excelforum.com/showthread.php?threadid=38760

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Alternate Rows temporarily to Edit worksheet Bridget~ Excel Worksheet Functions 2 April 29th 09 06:50 PM
Need to do the sum of a range+individual cells: (B2:B9)+B15=(B19:B T. Otten New Users to Excel 4 January 17th 09 01:24 PM
convert a range of cells into individual worksheets? KL in OK Excel Discussion (Misc queries) 1 January 23rd 08 01:11 AM
Sum Array Range & Individual Cells Native Excel Discussion (Misc queries) 1 December 5th 07 08:10 PM
Exclude Individual Cells While Printing Few more questions[_2_] Excel Discussion (Misc queries) 3 March 13th 07 09:26 PM


All times are GMT +1. The time now is 03:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"