Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Values in a MultiColumn Listbox
Dim sh as Worksheet
Dim i as Long Dim sName as String varr = Userform1.ListBox1.List for i = lbound(varr,1) to Ubound(varr,1) On Error Resume Next set sh = Worksheets(varr(i,lbound(varr,2)) On Error goto 0 if not sh is nothing then sName = Trim(varr(i,lbound(varr,2)+1)) sh.Name = sName end if Next -- Regards, Tom Ogilvy "Stuart" wrote in message ... I have a multicolumn listbox (2 cols). Col1 has values A, B C etc that represent actual sheetnames in the activeworkbook. Against each of these values, the user has typed into a textbox on the form, their true sheetnames. So the listbox might look like A Test1 B Test5 etc. How may I now rename the sheets with the user's true sheetnames, please? Regards. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
multicolumn adress file. want to sort on last , first name | New Users to Excel | |||
Listbox Values | Excel Discussion (Misc queries) | |||
Transferring items between multicolumn listboxes | Excel Discussion (Misc queries) | |||
ListBox with Horizontal Values | Excel Worksheet Functions | |||
Sorting ListBox results or transposing ListBox values to other cells for sorting | Excel Programming |