PC Review


Reply
Thread Tools Rate Thread

combobox doesn't load cell value at startup

 
 
Charlie
Guest
Posts: n/a
 
      21st Dec 2007
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?

 
Reply With Quote
 
 
 
 
merjet
Guest
Posts: n/a
 
      21st Dec 2007
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows XP doesn't fully load on startup, use CRTL ALT DEL then lo JonSorr Windows XP General 4 22nd Oct 2009 07:55 PM
Quick Launch Toobar doesn't load on startup in Windows XP Pro =?Utf-8?B?R2FyeSBNY0M=?= Windows XP General 13 2nd Oct 2007 07:04 AM
volume control icon doesn't load on startup tiki2k Windows XP General 3 23rd Feb 2005 08:46 AM
Macro doesn't load on startup =?Utf-8?B?cmpvbmVz?= Microsoft Word Document Management 1 14th Oct 2004 02:38 AM
Bug: Combobox.dropdown = True during Form.Load event handler causes listbox to be disabled, even though combobox is Enabled. =?Utf-8?B?UmF0a2lsZXk=?= Microsoft Dot NET Framework 0 12th Feb 2004 07:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:43 AM.