View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default Whats wrong with this macro please

Keep in mind that the cell reference A8:b8 will not change (in your code
module) if in the excel sheet (interface) "someone" moves your range or
inserts a row or column; Giving A8:B8 a name would improve such things.

HTH

"Dave Peterson" wrote in message
...
You could use something like:

With ActiveSheet
.PageSetup.PrintArea = "a8:b8"
.PrintOut preview:=True
End With

Or maybe without changing the printrange...

ActiveSheet.Range("a8:b8").PrintOut preview:=True

Mike wrote:

Hi
All i want to do is press a form button and print out a cell range, there
are multiple buttons on the spreadsheet each on to print a different
range of
cells on same sheet i used this
"ActiveSheet.PrintOut.PageSetup.PrintArea =
"A8:B8" to try and doi it changing the print area but it keeps saying
there
is an error, any ideas anybody please, or is there another way to do it
--
thanks
Mike


--

Dave Peterson