Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hey
I have a 2 workbooks A & B. A cntains a userform with a combobox. The combobox needs to display data on B colA. please guide me in doing this!!!! Regards |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub UserForm_Initialize()
Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100") End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... hey I have a 2 workbooks A & B. A cntains a userform with a combobox. The combobox needs to display data on B colA. please guide me in doing this!!!! Regards |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
when adding this code into "Private Sub UserForm_Initialize()" the button Private Sub cmdNewEntry_Click() UserForm1.Show End Sub returns with an error code "Run-time error 9" "Subscript out of range" is the code for the button in the wrong place? "Bob Phillips" wrote: Private Sub UserForm_Initialize() Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100") End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... hey I have a 2 workbooks A & B. A cntains a userform with a combobox. The combobox needs to display data on B colA. please guide me in doing this!!!! Regards |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That presumably means that your worksheet is not named B, you need to change
that. You could also change the VBE options (ToolsOptions) to break on all errors (on the General tab, Errors frame) so you see the real error. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... Hi when adding this code into "Private Sub UserForm_Initialize()" the button Private Sub cmdNewEntry_Click() UserForm1.Show End Sub returns with an error code "Run-time error 9" "Subscript out of range" is the code for the button in the wrong place? "Bob Phillips" wrote: Private Sub UserForm_Initialize() Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100") End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... hey I have a 2 workbooks A & B. A cntains a userform with a combobox. The combobox needs to display data on B colA. please guide me in doing this!!!! Regards |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i hav changed it to the name of the workbook and the sheet, & thats the error
msg returnd as well as the error setting on the options!!!!!! "Bob Phillips" wrote: That presumably means that your worksheet is not named B, you need to change that. You could also change the VBE options (ToolsOptions) to break on all errors (on the General tab, Errors frame) so you see the real error. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... Hi when adding this code into "Private Sub UserForm_Initialize()" the button Private Sub cmdNewEntry_Click() UserForm1.Show End Sub returns with an error code "Run-time error 9" "Subscript out of range" is the code for the button in the wrong place? "Bob Phillips" wrote: Private Sub UserForm_Initialize() Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100") End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... hey I have a 2 workbooks A & B. A cntains a userform with a combobox. The combobox needs to display data on B colA. please guide me in doing this!!!! Regards |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, I missed a vital part
Private Sub UserForm_Initialize() Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100").Address(, , , True) End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... i hav changed it to the name of the workbook and the sheet, & thats the error msg returnd as well as the error setting on the options!!!!!! "Bob Phillips" wrote: That presumably means that your worksheet is not named B, you need to change that. You could also change the VBE options (ToolsOptions) to break on all errors (on the General tab, Errors frame) so you see the real error. -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... Hi when adding this code into "Private Sub UserForm_Initialize()" the button Private Sub cmdNewEntry_Click() UserForm1.Show End Sub returns with an error code "Run-time error 9" "Subscript out of range" is the code for the button in the wrong place? "Bob Phillips" wrote: Private Sub UserForm_Initialize() Me.ComboBox1.RowSource = Worksheets("B").Range("A1:A100") End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Zaahir" wrote in message ... hey I have a 2 workbooks A & B. A cntains a userform with a combobox. The combobox needs to display data on B colA. please guide me in doing this!!!! Regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup headache | Excel Programming | |||
headache! :) unique_id's | Excel Worksheet Functions | |||
Hyperlink Headache | Excel Programming | |||
AND Headache (with dates)! | Excel Programming | |||
Look up Headache | Excel Programming |