View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] shahzad4u_ksa@yahoo.com is offline
external usenet poster
 
Posts: 68
Default Combobox Error message in UserForm

Dear Sir,

I have one UserForm having one combox1 and one close button, and in
the sheet I have range name for month: for combobox1

RowSource = MonthList
ControlSource = DailyIssue!A2



My code is for the userform is:

Option Explicit

Dim miEnd As Long

Private Sub CommandButton1_Click()
Unload Me
End Sub

Private Sub CommandButton2_Click()

Sheets("DailyIssue").Select
Range("A4:I1000").Select
Selection.Copy
Sheets("MonthlyIssue").Select
Range("A4").Select
ActiveSheet.Paste
Range("A1").Select

End Sub

Private Sub UserForm_Initialize()
ComboBox1 = ""
ComboBox1.SetFocus
End Sub

My problem is this: when I load my userform, my combo is showing the
list of months. like

Jan 08
Feb 08
Mar 08 so on.....

but when I am trying to type "Jan 08" its showing some thing else.
and giving errors.

Actualy I want to validate my combo to select only the following:

jan 08
feb 08
mar 08 like this.

----------------------------------

any solution, pls help me.

Regards


Shahzad