ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   using VBA, incerting a row for alphabetical order (https://www.excelbanter.com/excel-programming/302657-using-vba-incerting-row-alphabetical-order.html)

GregJG[_4_]

using VBA, incerting a row for alphabetical order
 
i use VBA on user form to add new names to a work sheet, it is set t
add at the next empty row.

Set SourceWb = Workbooks.Open("f:\db1.xls")
ActiveWorkbook.Sheets("Cust").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True


Is there a way to have it add on a cretain row, to keep list i
alphabetical order

--
Message posted from http://www.ExcelForum.com


mudraker[_284_]

using VBA, incerting a row for alphabetical order
 
Greg

Is there any reason why you can not sort the list after you add a ne
name

--
Message posted from http://www.ExcelForum.com


madcat[_6_]

using VBA, incerting a row for alphabetical order
 
why not use a macro and sor

--
Message posted from http://www.ExcelForum.com


Zygoid[_17_]

using VBA, incerting a row for alphabetical order
 
Thanks madcat, that is exactly what i did

--
Message posted from http://www.ExcelForum.com



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com