LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Expected:expression

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.



.

 
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
value expression RayB Excel Worksheet Functions 7 January 17th 07 09:57 PM
need help with expression Peterpunkin Excel Discussion (Misc queries) 5 May 4th 06 05:56 PM
Expression gudway New Users to Excel 3 May 4th 06 01:12 PM
Expected end of Statement FIRSTROUNDKO via OfficeKB.com Excel Worksheet Functions 2 April 11th 06 11:59 AM
Expression for Macro - help Pasmatos Excel Discussion (Misc queries) 4 November 28th 05 07:02 PM


All times are GMT +1. The time now is 04:32 AM.

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

About Us

"It's about Microsoft Excel"