Thread: Documentation
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Necessitysslave Necessitysslave is offline
external usenet poster
 
Posts: 9
Default Documentation

The below is a macro to create a new sheet with the formulas visible
and printable
however I've left formatting (resizing of cells and so forth) to you so
that it is readable on the printed document.

Sub printable()
Dim row As Integer
Dim col As Integer
Dim sheetname As String
sheetname = ActiveSheet.Name
ActiveWorkbook.Worksheets.Add
ActiveSheet.Name = "printable_" & sheetname
Worksheets("printable_" & sheetname).Range("A1:IV65536").NumberFormat =
"@"
For col = 1 To 30
For row = 1 To 30
If Worksheets(sheetname).Cells(col, row).Formula = "" Then
Worksheets("printable_" & sheetname).Cells(col, row) =
Worksheets(sheetname).Cells(col, row).Value
Else
Worksheets("printable_" & sheetname).Cells(col, row) =
Worksheets(sheetname).Cells(col, row).Formula
End If
Next row
Next col
End Sub

Hope this helps