Overcoming Msgbox 1024 Character Limit

Posted on 2005-04-28
Last Modified: 2008-01-09
I would like to display a Yes/No message that could be a maximum of several thousand characters.  Msgbox maxes out at 1024.  Anyone know of an easy way to overcome this limitation?

My code:
      If Not IsNull(strMsgList) And Not strMsgList = "" Then
        strMessage = "Another Certification is still active for the following people:" & vbNewLine & _
                     strMsgList & vbNewLine & _
                     "Do you still want to add this certification?"
        If vbYes = MsgBox(strMessage, vbYesNo, "Notice (SSG-6) Note: Message truncated after 1024 characters.  Do you still want to add this certification?") Then
          DupCerts = False
          DupCerts = True
        End If
      End If

Note: I put the note (Note: Message truncated after 1024 characters.  Do you still want to add this certification?) in the header info as a workaround.
Question by:schmir1
    LVL 34

    Accepted Solution

    Create your own form that looks like a msgbox and use that....

    Another one of the things to ask Mr Gates for next Xmas....
    LVL 65

    Expert Comment

    by:Jim Horn
    flavo nailed it.  Create a form with a big 'ol Memo field, or even a label if your prefer, with 'Yes' and 'No' buttons that you'll have to code yourself.

    Just out of curiosity, can you paste your >1024 character message here?

    Author Comment

    I was thinking there might be another MsgBox like an ActiveX that I could just call and it would take the same parameters.  I don't think I want to spend the time to roll my own.  I think will just live with what I've got.  The message looks like:
    Notice (SSG-6) Note: Message truncated after 1024 characters.  Do you still want to add this certification?
       Another Certification is still active for the following people:                                          
         Andrea McCready       Expiration:7/1/2005                                                              
         Barb Herrick          Expiration:7/1/2005                                                              
         Corie Rocksted        Expiration:7/1/2005                                                              
         Dave Johnson          Expiration:7/1/2005                                                              
         Mark Otto             Expiration:7/1/2005                                                              
         Matt Miller           Expiration:7/1/2005                                                              
         Sandy Hultman         Expiration:7/1/2005                                                              
         Steve Urman           Expiration:7/1/2005                                                              
         Bob Dreis             Expiration:7/1/2005                                                              
         Bob Schmitt           Expiration:7/1/2005                                                              
         Brenda Wells          Expiration:7/1/2005                                                              
         Dan Slagerman         Expiration:7/1/2005                                                              
         Dave Janowiec         Expiration:7/1/2005                                                              
         Jeff Perkins          Expiration:7/1/2005                                                              
         Julia Campion         Expiration:7/1/2005                                                              
         Ken Johnson           Expiration:7/1/2005                                                              
         Kyong Kim             Expiration:7/1/2005                                                              
         Terri Ornes           Expiration:7/1/2005                                                              
         Tony Lewis            Expiration:7/1/2005                                                              
         Claude Brist          Expiration:7/1/2005                                                              
         Frederic Benedetto                Expiration:7/1/2005                                                  
         John Marek            Expiration:7/1/2005                                                              
         Steve Korzenowski                 Expiration:7/1/2005                                                  
         Steve Poganski        Expiration:7/1/2005                                                              
         Wayne Hector          Expiration:7/1/2005                                                              
         Beth Fredette         Expiration:7/1/2005                                                              
         Beth Guck             Expir                                                                            
                                                                      Yes                  No                  
    LVL 74

    Assisted Solution

    by:Jeffrey Coachman
    Just a though,

    Could this text sting be sent to a "Report"?

    You could still display a generic message with the message box.

    Then send this Text string to a "Report"

    (The last line of the message would say "Please view the report)

    You could even code something like: "would you like to Preview or Print the Report"

    Just a suggestion

    Author Comment

    Add added the following code and unless there is some magical MsgBox, I think I'll go with it.  It displays the following:

    Notice (SSG-6)                                                          
       Another Certification is still active for the following people:      
         Andrea McCready                   Expiration: 8/1/2005            
         Barb Herrick                      Expiration: 8/1/2005            
         Corie Rocksted                    Expiration: 8/1/2005            
         Dave Johnson                      Expiration: 8/1/2005            
         Mark Otto                         Expiration: 8/1/2005            
         Matt Miller                       Expiration: 8/1/2005            
         Sandy Hultman                     Expiration: 8/1/2005            
         Steve Urman                       Expiration: 8/1/2005            
         Bob Dreis                         Expiration: 8/1/2005            
         Bob Schmitt                       Expiration: 8/1/2005            
         Brenda Wells                      Expiration: 10/13/2005          
         Dan Slagerman                     Expiration: 8/1/2005            
         Dave Janowiec                     Expiration: 8/1/2005            
         Jeff Perkins                      Expiration: 8/1/2005            
         Julia Campion                     Expiration: 10/13/2005          
         Ken Johnson                       Expiration: 8/1/2005            
         Kyong Kim                         Expiration: 10/13/2005          
         Terri Ornes                       Expiration: 10/13/2005          
         Tony Lewis                        Expiration: 8/1/2005            
         Claude Brist                      Expiration: 8/1/2005            
         Frederic Benedetto                            Expiration: 8/1/2005
         John Marek                        Expiration: 8/1/2005            
         Steve Korzenowski                             Expiration: 8/1/2005
       -More Users not displayed-                                          

       Do you still want to add this certification?                        
                              Yes                  No                      
    LVL 11

    Assisted Solution

    More than one successive message box to show all you want to everything? a bit messy but functional.

    LVL 39

    Expert Comment

    Perhaps changing Expiration: to Ex: will buy you enough extra characters.


    Author Comment

    Good suggestions if I had the time to do any of them.  I guess I'll stick with my above solution.  Thanks for you ideas.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    In the previous article, Using a Critera Form to Filter Records (, the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
    Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
    Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now