> ## 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.

# VBA Immediate Window Line and Character Limits
- URL: https://nolongerset.com/immediate-window-limits/
- Published: 2022-07-02T03:32:56.000Z
- Updated: 2026-05-08T12:56:38.000Z
- Description: Don't take my word for it (or anyone else's on the internet, for that matter). Prove the limits to yourself with some simple VBA.
- Author: Mike Wolfe
- Tags: Hidden Features, #Import 2026-05-20 02:59

Did you ever wonder how many characters would fit on a single line in the Immediate Window? Or how many lines would display before the first ones got chopped off? Well wonder no more!

## tl;dr: 200 Lines of 1,023 Characters

The immediate window will display a maximum of **200 lines** of text. 

Each line will display a maximum of **1,023 characters** before wrapping around to the next line.

But don't take my word for it! Use the code below to test it for yourself.

## Testing the Character Limit

This is easy to do from the immediate window itself using the [String() function](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/string-function):

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

## Testing the Line Limit

We'll do this with a standalone subroutine:

```vba
Public Sub ImmediateWindowLineTest()
    Const MaxLines As Long = 200
    
    Dim i As Long
    For i = 1 To MaxLines
        If i < MaxLines Then
            Debug.Print i
        Else
            'trailing semi-colon prevents the automatic line break
            '   from being added on the last trip through the loop
            Debug.Print i;   
        End If
    Next i
End Sub
```

IMPORTANT: Be sure to clear the immediate window before running the above subroutine. There's no reliable way to do that in code in Access, so just do it manually with a:

- **\[Ctrl\] + \[G\]**:*Go to immediate window*
- **\[Ctrl\] + \[A\]**: *Select all*
- **\[Delete\]**: *Umm...delete*

After executing the `ImmediateWindowLineTest()` routine, scroll up to the top of the immediate window. You will see the first line is "1".

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

Now scroll to the bottom of the immediate window. Notice that the cursor is blinking on an empty line below the number 200.

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

If you begin typing on that line–even something as simple as pressing the space bar–that now becomes the 200th line of text. Scroll back up to the top of the immediate window and you will see that the top line is now "2".

## Tip o' the Hat to Access MVP Adrian Bell

His conversation with fellow Access MVP Crystal Long in the LinkedIn comments section got me thinking this would be a good article to write along with some verifiable test code.

Here's [Adrian's original comment](https://www.linkedin.com/feed/update/urn:li:activity:6901711684378198016?commentUrn=urn%3Ali%3Acomment%3A%28activity%3A6901711684378198016%2C6901999016394272768%29&replyUrn=urn%3Ali%3Acomment%3A%28activity%3A6901711684378198016%2C6904561572430389248%29):

> \[I\]t's actually 200 lines. Each line can take up to 1,023 characters. Shorter lines have no effect on the total number of lines.  
> So, 204,600 characters is an absolute maximum but this can only be achieved with all lines (including the last with no CR LF added) filled to the max of 1,023\. Anything after that causes the first line to scroll out of the pane.  
> \- Adrian Bell

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

*Image by [jplenio](https://pixabay.com/users/jplenio-7645255/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=3120484) from [Pixabay](https://pixabay.com/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=3120484)*