Thread
:
Expected:expression
View Single Post
#
2
Posted to microsoft.public.excel.programming
Chip Pearson
external usenet poster
Posts: 7,247
Expected:expression
I left out line continuation characters. Sorry. Try
Worksheets("Home").Range("C8:C27").Sort _
Key1: = Worksheets("Home").Range("C8"), _
Order1:= xlAscending
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Capinvest" wrote in message
...
I tryed that and now I get the following error:
Compile error
Syntax error
I would appericiate any further help. Thanks.
-----Original Message-----
Change
Worksheets("Home").Range("C8:C27").Sort
Key1: = Worksheets("Home").Range("C8")
XlSortOrder.xlAscending
to
Worksheets("Home").Range("C8:C27").Sort
Key1: = Worksheets("Home").Range("C8"),
Order1:= xlAscending
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Capinvest" wrote in message
...
I am trying to sort a combobox alphabetically in excel
using vba. I have the following code behind the
combobox:
Private Sub ClientList_Change()
' this sorts the names alphabetically
Worksheets("Home").Range("C8:C27").Sort
Key1: = Worksheets("Home").Range("C8")
XlSortOrder.xlAscending
End Sub
I get an error everytime I try to run it. The error
says:
Compile error: Expected:expression
I would appericate any help with this issue.
.
Reply With Quote
Chip Pearson
View Public Profile
Find all posts by Chip Pearson