Excel - 2000 or 97 conversion - macro problems

A

ajw150

It did work, but the list that appears when you click, doesnt contai
data validated cells
 
D

Dave Peterson

Are you writing about the button or the combobox from the control toolbox
toolbar?

If it's the button, I don't understand.

If it's the combobox, go into design mode (an icon on that control toolbox
toolbar).

Right click on the combobox, select properties.
Look for ListFillRange
and type in the address that will contain the list.
(like Sheet2!a1:a10)

And you may want the LinkedCell (also on the properties dialog) to be the same
as the cell "holding" the combobox. (I'd give that cell a custom format of
";;;" (w/o the quotes). It'll look empty when looking at the worksheet--but you
can still select the cell and see the value in the formula bar.

And change the Style property to "2 - fmStyleDropDownList"
 
D

Dave Peterson

Oops. I meant to exit the sub after this portion:

If Target.Cells.Count > 1 Then
With Application
.EnableEvents = False
.Undo
.EnableEvents = True
End With
MsgBox "Only One Cell at a time!"
Exit Sub '<-- add this line
End If

Dave said:
Are you writing about the button or the combobox from the control toolbox
toolbar?

If it's the button, I don't understand.

If it's the combobox, go into design mode (an icon on that control toolbox
toolbar).

Right click on the combobox, select properties.
Look for ListFillRange
and type in the address that will contain the list.
(like Sheet2!a1:a10)

And you may want the LinkedCell (also on the properties dialog) to be the same
as the cell "holding" the combobox. (I'd give that cell a custom format of
";;;" (w/o the quotes). It'll look empty when looking at the worksheet--but you
can still select the cell and see the value in the formula bar.

And change the Style property to "2 - fmStyleDropDownList"
 
D

Dave Peterson

Oopsie again!

This was supposed to be a reply to a different thread.



Dave said:
Oops. I meant to exit the sub after this portion:

If Target.Cells.Count > 1 Then
With Application
.EnableEvents = False
.Undo
.EnableEvents = True
End With
MsgBox "Only One Cell at a time!"
Exit Sub '<-- add this line
End If
 
Top