> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Preventing Line Break After Debug.Print Statement
- URL: https://nolongerset.com/no-line-break-after-debug-print/
- Published: 2022-03-02T00:44:13.000Z
- Updated: 2026-05-08T12:59:22.000Z
- Description: Every time you call Debug.Print in VBA it outputs to a new line in the Immediate Window. ... But what if it didn't?!?!
- Author: Mike Wolfe
- Tags: Quick Tip, #Import 2026-05-20 02:59

When you execute the [Debug.Print statement](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/print-method) it outputs the evaluated expression to the immediate window. The cursor then moves to the next line in the window so that each Debug.Print statement will appear on its own line.

![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2022/03/image-10.png)

In other words, the **default behavior** is for Debug.Print to append a **newline (**specifically a Carriage Return-Line Feed; i.e., `vbCrLf`) after outputting the results of the expression. 

## Appending a Tab Instead of a Newline

If you end your statement with a **comma,** then Debug.Print appends a **Tab character** instead of a newline.

![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2022/03/image-11.png)

## Appending Nothing At All

If you end your statement with a **semicolon,** then Debug.Print **will not append anything** after its output.

![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2022/03/image-12.png)

*NOTE: In the example code above, I coerced the `i` variable to a `String` (`CStr(i)`) before outputting it because Debug.Print pads numeric values with a leading and trailing space.*

## Immediate Window Progress Meter

This behavior lets you do interesting things, such as implementing a quick-and-dirty ["progress meter" in the immediate window](https://nolongerset.com/poor-mans-status-bar/) by outputting a single character each time through a loop:

```vba
Sub TestPoorMansStatusBar()
    Debug.Print "Starting"
    Dim i As Long
    For i = 1 To 15
        Sleep 300
        Debug.Print ".";: DoEvents
    Next i
    Debug.Print "Done"
End Sub
```

![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2022/03/3AA93104-7F3F-4E87-96BB-69F77E24D0F9.GIF)

---

### External references

[Print method (Visual Basic for Applications)Office VBA reference topicMicrosoft Docso365devx![](https://docs.microsoft.com/en-us/media/logos/logo-ms-social.png)](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/print-method)

### Referenced articles

[Poor Man’s Status Bar in VBAIf you’re looking for a quick and dirty way to keep track of a long-running process while developing, this VBA one-liner will do the trick.![](https://nolongerset.com/favicon.png)No Longer SetMike Wolfe![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2021/07/Poor-Man-s-Status-Bar.jpg)](https://nolongerset.com/poor-mans-status-bar/)