Re: [RESOLVED] Combo Boxes
ahh damn.. marked it resolved when it isnt.
I get "run time error '1004':
Method 'Range' of object '_Global' failed."
Re: [RESOLVED] Combo Boxes
hm, on my PC this code works perfect:
VB Code:
Range(ComboBox1.Value).Select
Range(ActiveCell, ActiveCell.Offset(0, 1)).ClearContents
make sure that values of cell addresses in your RowSource property are correct
s_d
Re: [RESOLVED] Combo Boxes
I have the control source set to Sheet!A1 and the rowsource to sheet!List
where the list selects column A
any problems? :confused:
Re: [RESOLVED] Combo Boxes
are you using any other code in your macro??? can you paste the whole code you are using???
oh and have you changed the name of your combobox in the code???
s_d
Re: [RESOLVED] Combo Boxes
that's the only code in there. It's very basic. I have different pages in a userform with the combo box and button on each page. I think the problem is selecting the cell somewhere but I just cant figure it out
Re: [RESOLVED] Combo Boxes
the code which I gave you is selectiond cell with address which was choosen in combobox: so if you clicked in your combobox A1 value, code selects A1 cell and then selects range A1:B1 and clear it's content.
well, I don't have the foggiest idea what's wrong.
Re: [RESOLVED] Combo Boxes
Exactly what I was thinking. HOWEVER (:p) this is for a school project and I can use this as part of my evaluation (if that's ok with you) stating that the code I used should have worked and I could then evaluate it to hell and write all this fancy stuff etc :)
Still, I dont see why what you gave me shouldn't have worked. All the names, cells etc are all correct :confused:
Thanks anyways :)
Re: [RESOLVED] Combo Boxes
you don't need to set control source property, row source is enought if you only want to assign list of values to your combobox
hm I don't understand wha you mean by saying:
Quote:
where the list selects column A
try row source property as for eg sheet1!a1-a11
Re: [RESOLVED] Combo Boxes
what i meant by that is the list was the entire column A. This was because there was to be an unlimited ammount in that column and it had be selected within the system. I just tried removing the control source and am still getting the error. It's ok though, should be alright for me to just do it as it is.
Re: [RESOLVED] Combo Boxes
how did you create this list ??? I think here could be a problem
Re: [RESOLVED] Combo Boxes
Went to the sheet. Pressed A to select the whole column (which works fine in other places) and named it using the name box. Like I said, it's used as i list in validation on another page so there's no error in the list itself as far as I can tell.
Re: [RESOLVED] Combo Boxes
where do you exactly get the error message ???
Re: [RESOLVED] Combo Boxes
Isn't that. I can still view the list. The correct property I have for that is "PERIPHERALS!PSR" where the sheet name is PERIPHERALS and the list is PSR.Not sure if this one's going to be solved :confused: