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

  • Home
  • SEARCH
  • 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 6700805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:51:30+00:00 2026-05-26T06:51:30+00:00

I have several ComboBoxes in an Excel VSTO Solution. The combos are windows forms

  • 0

I have several ComboBoxes in an Excel VSTO Solution. The combos are windows forms combos.

The issue is that I’d like selected value in the combo to be repopulated when the user reopens the spreadsheet. Currently, I know that the values are saved with the spreadsheet, I know this I’ve ran into ClickOnce installer problems due to developing and testing on the same machine, and I can see the spreadsheet open, and the installer go to get the new version. During that time, I see the combo values I want.

However, once the customization installs and the spreadsheet initializes, the combos reset to default text values. I can think of a few ways to get around this, involving using cached data… Does anyone know if there is a simple way to keep the combos from resetting when the spreadsheet opens?

  • 1 1 Answer
  • 0 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-26T06:51:31+00:00Added an answer on May 26, 2026 at 6:51 am

    I don’t know if this is necessarily the best solution, but this is what I ended up doing.

    I first embedded my combos into cells.

    Friend WithEvents cmbType
    
    Private Sub EmbedCombo()
       cmbType = Me.Controls.AddComboBox(Me.Range("A7"), "cmbType")
    End Sub
    

    Then I created a sub to write the value of the Combo Text, back into the cell that the control resided in.

    Private Sub SaveComboText()
       Me.Range("A7").Value = Me.cmbType.Text
    End Sub
    

    Finally a routine that writes the Cell Value back to the Combo.

    Private Sub LoadComboText()
       Me.cmbType.Text = Me.Range("A7").Value  
    End Sub
    

    To make it all work, I use the WorkBoook BeforeSave Event, and the WorkSheet.StartUp Event.

    First

    Private Sub ThisWorkbook_BeforeSave() Handles Me.BeforeSave
        Globals.Sheet1.StoreComboValues()
    End Sub
    

    Then

    Private Sub Sheet1_Startup() Handles Me.Startup
      Call LoadComboText()
    End Sub
    

    If someone else knows of a better way to avoid this, let me know:)

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

Sidebar

Related Questions

I have several forms with many textboxes/comboboxes, and I would like to have the
I have several old 3.5in floppy disks that I would like to backup. My
So I have several comboboxes in my WPF application that don't change the selection
I have several databound comboboxes in my application and I notice that when i
I have a WinForms app that contains several comboboxes, numericupdown controls and checkboxes. I
I have a custom control that has several text boxes and combo boxes in
I have a data entry form that had several comboboxes on it. Each of
I have a GUI that contains several components (combo boxes, textboxes, etc) with their
I have a form in VB.Net with Autoscroll enabled and several ComboBoxes within it.
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on

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.