Frank Freese
asked on
Output the Immediate window to printer or screen
Folks,
I would like to add to the below code after the End Width the ability for the user to look at the Immediate window and then elect to print out those results with the use of a MsgBox
?
I would like to add to the below code after the End Width the ability for the user to look at the Immediate window and then elect to print out those results with the use of a MsgBox
?
Sub DocFormulaWks()
Dim rng As Range
With ActiveSheet
For Each rng In .UsedRange
If rng.HasFormula = True Then
Debug.Print "Addr.: " & rng.Address
Debug.Print "Form.: " & rng.Formula
Debug.Print "Value : " & rng.Value
End If
Next rng
End With
End Sub
The Immediate Window isn't functional except when debugging/developing.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK - so the output to the Immediate Window can not be sent to a printer but the data could. In the submitted code what would that look like, please.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Like this?
Sub DocFormulaWks()
Dim rng As Range
With ActiveSheet
For Each rng In .UsedRange
If rng.HasFormula = True Then
Printer.Print "Addr.: " & rng.Address
Printer.Print "Form.: " & rng.Formula
Printer.Print "Value : " & rng.Value
Printer.EndDoc
End If
Next rng
End With
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks - I guess this is why they pay you the "big" bucks for people like me. As always, I appreciate you
ASKER
great job!
YW and thanks for the kind words.
Marty - MVP 2009 to 2013
Marty - MVP 2009 to 2013
thanks - I guess this is why they pay you the "big" bucks for people like me. As always, I appreciate you
When did the "Experts" get paid for providing answers to questions?
Am I missing out? ;)