Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo Headache
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
|
|||
|
|||
Combo Headache
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
|
|||
|
|||
Combo Headache
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
|
|||
|
|||
Combo Headache
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
|
|||
|
|||
Combo Headache
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
|
|||
|
|||
Combo Headache
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combo Headache
hi kay no prob... i still cant get it to run, but opted to create a sheet2,named DB & set the rowsource property to DB!"Range", this helps but now evry1 can see the database..... Any ideas on how to hide the data or protect it via code or do u think i should opt for the easiest route "password protection" "Bob Phillips" wrote: 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 | |
|
|
Similar Threads | ||||
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 |