![]() |
still get runtime error 424
Sorry, am I supposed to create a variable for the Listbox1.rowsource line?
I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
hi
no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
I am really sorry but I did post it already, what am I missing? I am just
trying to get it to load the names in column A in the list box, and another combox with the date and another with the choices, multiprint, singlepring or exit. But if you mean the code I want it to run when I click either single or multi print is I want it to take a single name and create a new sheet with that name on it or in the case of a multi-print create new sheets for all the list. This part isn't done yet. "FSt1" wrote: hi no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
hi
sorry. i didn't read far enought on your first post. ListBox1.ColumnCount = rng is this how your are trying to load the list box. if so, column count has to be a number. you use this to add multiple columns in the list box. listbox1.rowsource = rng. (i think it will take a named range?) if not then listbox1.rowsource = range("A1:A5") or whatever. you are loading in the initialization sub and you are loading the comboboxes right. regards FSt1 "Janis" wrote: I am really sorry but I did post it already, what am I missing? I am just trying to get it to load the names in column A in the list box, and another combox with the date and another with the choices, multiprint, singlepring or exit. But if you mean the code I want it to run when I click either single or multi print is I want it to take a single name and create a new sheet with that name on it or in the case of a multi-print create new sheets for all the list. This part isn't done yet. "FSt1" wrote: hi no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
Just to make it easier to understand I just tried to load just the one combo
box with the Private Sub UserForm_Initialize() ComboBox2.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub I get the error message runtime 380 cannot load the rowsource? "FSt1" wrote: hi no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
hi,
perhaps i wasn't clean myself. i ment load the combo boxes in the initialization sub. use the add item method. see my last post. regards FSt1 "Janis" wrote: Just to make it easier to understand I just tried to load just the one combo box with the Private Sub UserForm_Initialize() ComboBox2.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub I get the error message runtime 380 cannot load the rowsource? "FSt1" wrote: hi no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
Hi
Thanks for your help, I'm pretty sure the problem is I don't understand userforms. REgarding the addItem, is that in conjunction with the row source;? Private Sub UserForm_Initialize() ComboBox2.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12") ComboBox2.AddItem End Sub THIS ONE GETS A runtime error type mismatch 13. Regards, "FSt1" wrote: hi, perhaps i wasn't clean myself. i ment load the combo boxes in the initialization sub. use the add item method. see my last post. regards FSt1 "Janis" wrote: Just to make it easier to understand I just tried to load just the one combo box with the Private Sub UserForm_Initialize() ComboBox2.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub I get the error message runtime 380 cannot load the rowsource? "FSt1" wrote: hi no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
Hi
This is weird but I tried this and the form at least runs but I still don't get the range in the combo box? Private Sub UserForm_Initialize() ComboBox2.RowSource = rng rng = ThisWorkbook.Sheets("Patients").Range("A1:A12") End Sub tnx, "FSt1" wrote: hi, perhaps i wasn't clean myself. i ment load the combo boxes in the initialization sub. use the add item method. see my last post. regards FSt1 "Janis" wrote: Just to make it easier to understand I just tried to load just the one combo box with the Private Sub UserForm_Initialize() ComboBox2.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub I get the error message runtime 380 cannot load the rowsource? "FSt1" wrote: hi no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
Thanks for your help, I will just repost the question.
"Janis" wrote: Hi Thanks for your help, I'm pretty sure the problem is I don't understand userforms. REgarding the addItem, is that in conjunction with the row source;? Private Sub UserForm_Initialize() ComboBox2.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12") ComboBox2.AddItem End Sub THIS ONE GETS A runtime error type mismatch 13. Regards, "FSt1" wrote: hi, perhaps i wasn't clean myself. i ment load the combo boxes in the initialization sub. use the add item method. see my last post. regards FSt1 "Janis" wrote: Just to make it easier to understand I just tried to load just the one combo box with the Private Sub UserForm_Initialize() ComboBox2.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub I get the error message runtime 380 cannot load the rowsource? "FSt1" wrote: hi no variable needed. post the code your are using. for list box and combo box. Regards FSt1 "Janis" wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub |
still get runtime error 424
You have another response at your earlier post.
Janis wrote: Sorry, am I supposed to create a variable for the Listbox1.rowsource line? I still get runtime error. It can't load the listbox. It is just column A, for easy testing I just used the first few rows but I need all last names in the listbox. So are you saying I must load the other two control combox'es the same way? What I did here works except for this list box but are you saying in order to run a procedure based on the choice I need to load them the same as the listbox I will change it but can you tell me why I get the 424 error? Thanks, Private Sub UserForm_Initialize() ComboBox1.AddItem "Print Single" ComboBox1.AddItem "Print Multiple" ComboBox1.AddItem "Exit" ComboBox3.AddItem Date 'ComboBox1.ListIndent = 1 ListBox1.RowSource = ThisWorkbook.Sheets("Patients").Range("A1:A12").Ad dress(external:=True) End Sub -- Dave Peterson |
All times are GMT +1. The time now is 02:11 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com