Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default combobox doesn't load cell value at startup

I've got my combobox to apply the change made to it immediately with:
Private Sub ComboBox1_Change()
Worksheets("sheet1").Range("C16") = Me.ComboBox1.Value
End Sub
....and I leave the controlsource empty

But now, when the form loads, it doesn't load the cell value back into the
combobox, it's just blank... How do I adjust this?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default combobox doesn't load cell value at startup

Private Sub UserForm_Initialize()
If Worksheets("sheet1").Range("C16") < "" Then
For Each c In Range(ComboBox1.RowSource)
If c = Worksheets("sheet1").Range("C16") Then
ComboBox1.Value = c
Exit Sub
End If
Next c
End If
End Sub

Hth,
Merjet

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to load Excel startup files through code e'[email protected] Excel Programming 1 May 3rd 06 04:02 PM
Toolbar should not load at startup sharkfoot Excel Discussion (Misc queries) 5 March 23rd 06 11:47 PM
Unable to load files from alternate startup folder Bill.Carlson Excel Discussion (Misc queries) 3 November 24th 05 03:36 PM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM
Load Sheet2 on Startup?? Michael Vaughan Excel Programming 2 August 25th 04 04:36 AM


All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"