Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Macro to Print specific cells with formatting

I want to creat a Macro to Print a specific area, while formatting that
information into a clean and visually appealing appearance.

The area is from C2 to I2 and from rows 2 to 91. When it prints, I just
want to see the information without the gridlines.

Finally, I want the code to run from a Macro button you just "click to print"

Clark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to Print specific cells with formatting

In page setup, go to the last tab and unselect gridlines.

Private sub Commandbutton1_Click()
Range("C2:I91").printout
End Sub


or
Private sub Commandbutton1_Click()
activesheet.pagesetup.Printgridlines = False
Range("C2:I91").printout
End Sub

if you want to set it in code.
--
Regards,
Tom Ogilvy


"Clark" wrote:

I want to creat a Macro to Print a specific area, while formatting that
information into a clean and visually appealing appearance.

The area is from C2 to I2 and from rows 2 to 91. When it prints, I just
want to see the information without the gridlines.

Finally, I want the code to run from a Macro button you just "click to print"

Clark

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Macro to Print specific cells with formatting

Thanks Tom,

This is my first Macro, so can I create a "button" with this code and place
it on the worksheet?

Clark

"Tom Ogilvy" wrote:

In page setup, go to the last tab and unselect gridlines.

Private sub Commandbutton1_Click()
Range("C2:I91").printout
End Sub


or
Private sub Commandbutton1_Click()
activesheet.pagesetup.Printgridlines = False
Range("C2:I91").printout
End Sub

if you want to set it in code.
--
Regards,
Tom Ogilvy


"Clark" wrote:

I want to creat a Macro to Print a specific area, while formatting that
information into a clean and visually appealing appearance.

The area is from C2 to I2 and from rows 2 to 91. When it prints, I just
want to see the information without the gridlines.

Finally, I want the code to run from a Macro button you just "click to print"

Clark

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to Print specific cells with formatting

no, why would you want to create a button with code. You said you wanted to
execute this macro using a button. Place a button on the worksheet from the
control toolbox toolbar and double click on it. this will take you to the
click event.

Make the event look like this (insuring you use the correct name for the
button - this is an example)

Private sub Commandbutton1_Click()
me.pagesetup.Printgridlines = False
me.Range("C2:I91").printout
End Sub

then come back to excel an in the control toolbox toolbar, click the Top
Left button to take your workbook out of design mode. Now if you click the
button, it should print the range.

--
Regards,
Tom Ogilvy


"Clark" wrote:

Thanks Tom,

This is my first Macro, so can I create a "button" with this code and place
it on the worksheet?

Clark

"Tom Ogilvy" wrote:

In page setup, go to the last tab and unselect gridlines.

Private sub Commandbutton1_Click()
Range("C2:I91").printout
End Sub


or
Private sub Commandbutton1_Click()
activesheet.pagesetup.Printgridlines = False
Range("C2:I91").printout
End Sub

if you want to set it in code.
--
Regards,
Tom Ogilvy


"Clark" wrote:

I want to creat a Macro to Print a specific area, while formatting that
information into a clean and visually appealing appearance.

The area is from C2 to I2 and from rows 2 to 91. When it prints, I just
want to see the information without the gridlines.

Finally, I want the code to run from a Macro button you just "click to print"

Clark

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Macro to Print specific cells with formatting

Thanks Tom,

Ok, so I am not that bright. I did this, but nothing happens when I click
the button.

"Tom Ogilvy" wrote:

no, why would you want to create a button with code. You said you wanted to
execute this macro using a button. Place a button on the worksheet from the
control toolbox toolbar and double click on it. this will take you to the
click event.

Make the event look like this (insuring you use the correct name for the
button - this is an example)

Private sub Commandbutton1_Click()
me.pagesetup.Printgridlines = False
me.Range("C2:I91").printout
End Sub

then come back to excel an in the control toolbox toolbar, click the Top
Left button to take your workbook out of design mode. Now if you click the
button, it should print the range.

--
Regards,
Tom Ogilvy


"Clark" wrote:

Thanks Tom,

This is my first Macro, so can I create a "button" with this code and place
it on the worksheet?

Clark

"Tom Ogilvy" wrote:

In page setup, go to the last tab and unselect gridlines.

Private sub Commandbutton1_Click()
Range("C2:I91").printout
End Sub


or
Private sub Commandbutton1_Click()
activesheet.pagesetup.Printgridlines = False
Range("C2:I91").printout
End Sub

if you want to set it in code.
--
Regards,
Tom Ogilvy


"Clark" wrote:

I want to creat a Macro to Print a specific area, while formatting that
information into a clean and visually appealing appearance.

The area is from C2 to I2 and from rows 2 to 91. When it prints, I just
want to see the information without the gridlines.

Finally, I want the code to run from a Macro button you just "click to print"

Clark



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro to Print specific cells with formatting

Best I can do is send you a sample workbook if you want to contact me with a
valid email address at

--
Regards,
Tom Ogilvy


"Clark" wrote:

Thanks Tom,

Ok, so I am not that bright. I did this, but nothing happens when I click
the button.

"Tom Ogilvy" wrote:

no, why would you want to create a button with code. You said you wanted to
execute this macro using a button. Place a button on the worksheet from the
control toolbox toolbar and double click on it. this will take you to the
click event.

Make the event look like this (insuring you use the correct name for the
button - this is an example)

Private sub Commandbutton1_Click()
me.pagesetup.Printgridlines = False
me.Range("C2:I91").printout
End Sub

then come back to excel an in the control toolbox toolbar, click the Top
Left button to take your workbook out of design mode. Now if you click the
button, it should print the range.

--
Regards,
Tom Ogilvy


"Clark" wrote:

Thanks Tom,

This is my first Macro, so can I create a "button" with this code and place
it on the worksheet?

Clark

"Tom Ogilvy" wrote:

In page setup, go to the last tab and unselect gridlines.

Private sub Commandbutton1_Click()
Range("C2:I91").printout
End Sub


or
Private sub Commandbutton1_Click()
activesheet.pagesetup.Printgridlines = False
Range("C2:I91").printout
End Sub

if you want to set it in code.
--
Regards,
Tom Ogilvy


"Clark" wrote:

I want to creat a Macro to Print a specific area, while formatting that
information into a clean and visually appealing appearance.

The area is from C2 to I2 and from rows 2 to 91. When it prints, I just
want to see the information without the gridlines.

Finally, I want the code to run from a Macro button you just "click to print"

Clark

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
HOW DO I NOT PRINT SPECIFIC CELLS IN EXCELL Ray Excel Discussion (Misc queries) 1 April 22nd 08 11:15 PM
print button macro & specific tabs to print Chuck[_3_] Excel Worksheet Functions 2 November 22nd 07 12:21 AM
Setting Specific Cells To Not Print Jeremy.Whitney Excel Discussion (Misc queries) 2 July 31st 06 02:20 AM
print specific cells Wendy Excel Discussion (Misc queries) 1 February 10th 05 06:52 PM
Macro to Print to a specific bin Tom Ogilvy Excel Programming 1 September 10th 03 06:52 PM


All times are GMT +1. The time now is 09:04 PM.

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

About Us

"It's about Microsoft Excel"