Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 216403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:33:40+00:00 2026-05-11T18:33:40+00:00

I have a vb .net program that exports information to certain fields of an

  • 0

I have a vb .net program that exports information to certain fields of an excel workbook using named ranges. One of the named ranges is a notes section that gets cut off (not visible nor gets printed) if it extends beyond a page break. I am looking for a way to dynamically create new named ranges to accommodate all of the notes’ text.

Some other information:

  • The named range is a merged cell from A2:L36 with text wrap enabled

  • Column A is 31 units wide

  • Columns B through L are 8.38 units wide

  • All of the rows are 15.75 units high

  • I do NOT want to print blank pages, resize the font, disable text wrapping, have the end user do any re-formatting, nor change the size of the cells as I have tried these approaches without success.

  • Using Excel 2007

HELP PLEASE!

Thanx in advance!
~8th


forgive my ignorance, I’m still a n00b

  • 1 1 Answer
  • 3 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:33:41+00:00Added an answer on May 11, 2026 at 6:33 pm

    Thanks again Lunatik for your response. I was able to come up with an acceptable workaround before I saw your most recent post. This is not the most graceful solution but it is most suitable for what I was trying to accomplish. I hope this can be of some use to someone else in the future.

    Dim sNotes As String = g_strProgram.sNotes
    Dim iStartIndex, iEndIndex As Integer
    Dim iRow As Integer = 0
    
    If (sNotes.Length > 0) Then
       g_frmMain.ucAdditionalInfo.txtNotes.Text = sNotes
       Do
          iRow += 1
          oWorkSheet.Range("A" & iRow + 1 & ":L" & iRow + 1).Merge()
          iStartIndex = IIf(iRow = 1, 0, iEndIndex + 1)
    
          If (g_frmMain.ucAdditionalInfo.txtNotes.GetFirstCharIndexFromLine(iRow) >= 0) Then
             iEndIndex = g_frmMain.ucAdditionalInfo.txtNotes.GetFirstCharIndexFromLine(iRow) - 1
          Else
             iEndIndex = g_strProgram.sNotes.Length - 1
          End If
    
          oWorkSheet.Range("ProgramNote").Offset(iRow, 0).Value = g_strProgram.sNotes.Substring(iStartIndex, iEndIndex - iStartIndex).TrimEnd(vbCrLf)
       Loop While (iEndIndex < g_strProgram.sNotes.Length - 1)
    Else
           oWorkSheet.Visible = Excel.XlSheetVisibility.xlSheetHidden
    End If
    

    If anyone out there reading this needs clarification with any of the aforementioned, do not hesitate to post a question here!
    ~8th

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an asp.net c# program that reads a sheet from an Excel file
I have a vb.net program that uses mysql as its database. And it works
I have a .NET 2.0 program that has a reference to Interop.WIA.dll (.NET), which
I have just started work on asmall program that sends text over net (TON)
I have an ASP.NET web service that I can access via a windows program
I have a program written in VB.Net (Visual Studio 2008) that uses a DLL
I have a client program written in .NET 2.0, that connects to the web
I have a Util module in my VB.NET program that has project-wide methods such
I have .NET program that can't be run from Visual Studio for some reasons
We have a small .Net program that we sell with individual licenses. The individual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.