Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default 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

  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
runtime error '1004' application or object defined error Janis Excel Programming 4 November 18th 09 03:01 PM
runtime error '1004' application or object defined error. Please help deej Excel Programming 0 August 1st 07 09:26 AM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
naming tab macro error runtime error 1004 D Excel Programming 3 February 28th 05 01:32 AM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"