ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combobox Error message in UserForm (https://www.excelbanter.com/excel-programming/411172-combobox-error-message-userform.html)

[email protected]

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


All times are GMT +1. The time now is 06:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com